keuss 1.6.10 → 1.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Pipeline/Queue.js +12 -2
- package/Queue.js +18 -8
- package/TODO +0 -1
- package/backends/bucket-mongo-safe.js +42 -44
- package/backends/bucket-mongo.js +6 -8
- package/examples/snippets/06-random-consumer-producer.js +5 -5
- package/package.json +6 -6
- package/test/backends_bucket-at-least-once.js +43 -35
- package/test/backends_deadletter.js +10 -1
- package/.nyc_output/ad035de4-a3d3-451b-b2ad-402e8ed517b8.json +0 -1
- package/.nyc_output/c8683d6c-e7e6-496b-ab0d-1ff730837d08.json +0 -1
- package/.nyc_output/processinfo/ad035de4-a3d3-451b-b2ad-402e8ed517b8.json +0 -1
- package/.nyc_output/processinfo/c8683d6c-e7e6-496b-ab0d-1ff730837d08.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -79
- package/coverage/index.html +0 -162
- package/coverage/keuss/Pipeline/BaseLink.js.html +0 -636
- package/coverage/keuss/Pipeline/Builder.js.html +0 -615
- package/coverage/keuss/Pipeline/ChoiceLink.js.html +0 -294
- package/coverage/keuss/Pipeline/DirectLink.js.html +0 -231
- package/coverage/keuss/Pipeline/Pipeline.js.html +0 -258
- package/coverage/keuss/Pipeline/Queue.js.html +0 -939
- package/coverage/keuss/Pipeline/Sink.js.html +0 -147
- package/coverage/keuss/Pipeline/index.html +0 -175
- package/coverage/keuss/QFactory-MongoDB-defaults.js.html +0 -219
- package/coverage/keuss/QFactory.js.html +0 -459
- package/coverage/keuss/Queue.js.html +0 -2274
- package/coverage/keuss/Signal.js.html +0 -312
- package/coverage/keuss/Stats.js.html +0 -174
- package/coverage/keuss/backends/bucket-mongo-safe.js.html +0 -2952
- package/coverage/keuss/backends/bucket-mongo.js.html +0 -1167
- package/coverage/keuss/backends/index.html +0 -175
- package/coverage/keuss/backends/mongo.js.html +0 -897
- package/coverage/keuss/backends/pl-mongo.js.html +0 -723
- package/coverage/keuss/backends/ps-mongo.js.html +0 -1038
- package/coverage/keuss/backends/redis-list.js.html +0 -513
- package/coverage/keuss/backends/redis-oq.js.html +0 -543
- package/coverage/keuss/bench/all-mongo.js.html +0 -393
- package/coverage/keuss/bench/index.html +0 -149
- package/coverage/keuss/bench/multi-q.js.html +0 -324
- package/coverage/keuss/bench/redis-oq-consumer-producer.js.html +0 -225
- package/coverage/keuss/bench/redis-oq-consumer.js.html +0 -189
- package/coverage/keuss/bench/redis-oq-producer.js.html +0 -198
- package/coverage/keuss/docusaurus/.docusaurus/client-modules.js.html +0 -93
- package/coverage/keuss/docusaurus/.docusaurus/docusaurus.config.js.html +0 -402
- package/coverage/keuss/docusaurus/.docusaurus/index.html +0 -136
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/01a85c17.4e57aa0a.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/09d5ad39.3009117f.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/1.12cf3eb8.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/12559443.a244228c.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/17896441.5efb3558.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/1be78505.f9c04817.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/2.4e2dc02c.js.html +0 -72
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/3.d549a05d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/36.db0e809a.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/37637b3c.28c0900b.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/3d8d21df.2228b429.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/45a5cd1f.951da354.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/52c38f7a.785707bc.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/57ffbe3d.04d3e53e.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/5f7c35e9.2fa77599.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6299bd84.ec197a3e.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6875c492.cdf3e939.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/6beec1d2.6873e708.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/7b786ad4.bbce08e6.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/8070e160.400a4e57.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/88c93c54.e868a433.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/8d3e6f9e.aadf6d32.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/9bc74468.516633c5.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/9beb87c2.71e3744d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/a3732fac.b0f98dbf.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/a6aa9e1f.6ac55e6c.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/baf0d4a2.b50efd2d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/c4f5d8e4.e9dfd999.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/ccc49370.1831890b.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/d4942345.7d23b349.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/e2244795.4ea3d168.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/e64fe266.308265e8.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/f78725cc.5f3e115d.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/fa8d8063.2312a332.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/index.html +0 -565
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/main.66f1008c.js.html +0 -72
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/runtime~main.7d73b048.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/keuss-gh-pages/styles.b5ee3016.js.html +0 -69
- package/coverage/keuss/docusaurus/.docusaurus/registry.js.html +0 -165
- package/coverage/keuss/docusaurus/.docusaurus/routes.js.html +0 -447
- package/coverage/keuss/docusaurus/build/01a85c17.4e57aa0a.js.html +0 -69
- package/coverage/keuss/docusaurus/build/09d5ad39.3009117f.js.html +0 -69
- package/coverage/keuss/docusaurus/build/1.12cf3eb8.js.html +0 -69
- package/coverage/keuss/docusaurus/build/12559443.a244228c.js.html +0 -69
- package/coverage/keuss/docusaurus/build/17896441.5efb3558.js.html +0 -69
- package/coverage/keuss/docusaurus/build/1be78505.f9c04817.js.html +0 -69
- package/coverage/keuss/docusaurus/build/2.4e2dc02c.js.html +0 -72
- package/coverage/keuss/docusaurus/build/3.d549a05d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/36.db0e809a.js.html +0 -69
- package/coverage/keuss/docusaurus/build/37637b3c.28c0900b.js.html +0 -69
- package/coverage/keuss/docusaurus/build/3d8d21df.2228b429.js.html +0 -69
- package/coverage/keuss/docusaurus/build/45a5cd1f.951da354.js.html +0 -69
- package/coverage/keuss/docusaurus/build/52c38f7a.785707bc.js.html +0 -69
- package/coverage/keuss/docusaurus/build/57ffbe3d.04d3e53e.js.html +0 -69
- package/coverage/keuss/docusaurus/build/5f7c35e9.2fa77599.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6299bd84.ec197a3e.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6875c492.cdf3e939.js.html +0 -69
- package/coverage/keuss/docusaurus/build/6beec1d2.6873e708.js.html +0 -69
- package/coverage/keuss/docusaurus/build/7b786ad4.bbce08e6.js.html +0 -69
- package/coverage/keuss/docusaurus/build/8070e160.400a4e57.js.html +0 -69
- package/coverage/keuss/docusaurus/build/88c93c54.e868a433.js.html +0 -69
- package/coverage/keuss/docusaurus/build/8d3e6f9e.aadf6d32.js.html +0 -69
- package/coverage/keuss/docusaurus/build/9bc74468.516633c5.js.html +0 -69
- package/coverage/keuss/docusaurus/build/9beb87c2.71e3744d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/a3732fac.b0f98dbf.js.html +0 -69
- package/coverage/keuss/docusaurus/build/a6aa9e1f.6ac55e6c.js.html +0 -69
- package/coverage/keuss/docusaurus/build/baf0d4a2.b50efd2d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/c4f5d8e4.e9dfd999.js.html +0 -69
- package/coverage/keuss/docusaurus/build/ccc49370.1831890b.js.html +0 -69
- package/coverage/keuss/docusaurus/build/d4942345.7d23b349.js.html +0 -69
- package/coverage/keuss/docusaurus/build/e2244795.4ea3d168.js.html +0 -69
- package/coverage/keuss/docusaurus/build/e64fe266.308265e8.js.html +0 -69
- package/coverage/keuss/docusaurus/build/f78725cc.5f3e115d.js.html +0 -69
- package/coverage/keuss/docusaurus/build/fa8d8063.2312a332.js.html +0 -69
- package/coverage/keuss/docusaurus/build/index.html +0 -565
- package/coverage/keuss/docusaurus/build/main.66f1008c.js.html +0 -72
- package/coverage/keuss/docusaurus/build/runtime~main.7d73b048.js.html +0 -69
- package/coverage/keuss/docusaurus/build/styles.b5ee3016.js.html +0 -69
- package/coverage/keuss/docusaurus/docusaurus.config.js.html +0 -360
- package/coverage/keuss/docusaurus/index.html +0 -110
- package/coverage/keuss/docusaurus/sidebars.js.html +0 -96
- package/coverage/keuss/docusaurus/src/pages/index.html +0 -97
- package/coverage/keuss/docusaurus/src/pages/index.js.html +0 -450
- package/coverage/keuss/examples/pipelines/builder/index.html +0 -97
- package/coverage/keuss/examples/pipelines/builder/index.js.html +0 -450
- package/coverage/keuss/examples/pipelines/simplest/index.html +0 -97
- package/coverage/keuss/examples/pipelines/simplest/index.js.html +0 -183
- package/coverage/keuss/examples/pipelines/simulation-fork/index.html +0 -97
- package/coverage/keuss/examples/pipelines/simulation-fork/index.js.html +0 -414
- package/coverage/keuss/examples/snippets/01-simplest-pop-push.js.html +0 -195
- package/coverage/keuss/examples/snippets/02-simplest-reserve-rollback-commit.js.html +0 -201
- package/coverage/keuss/examples/snippets/03-simplest-producer-consumer-loops.js.html +0 -300
- package/coverage/keuss/examples/snippets/04-bucket-mongo-safe-insert-reserve-commit.js.html +0 -303
- package/coverage/keuss/examples/snippets/05-insert-reserve-rollback-deadletter.js.html +0 -384
- package/coverage/keuss/examples/snippets/06-random-consumer-producer.js.html +0 -879
- package/coverage/keuss/examples/snippets/index.html +0 -188
- package/coverage/keuss/examples/snippets/redislabs-consumer-producer.js.html +0 -201
- package/coverage/keuss/examples/snippets/with-redis-stats-and-signaller-consumer-producer.js.html +0 -222
- package/coverage/keuss/examples/webhooks/app.js.html +0 -279
- package/coverage/keuss/examples/webhooks/consumer.js.html +0 -363
- package/coverage/keuss/examples/webhooks/index.html +0 -123
- package/coverage/keuss/examples/webhooks/index.js.html +0 -234
- package/coverage/keuss/index.html +0 -149
- package/coverage/keuss/playground/index.html +0 -136
- package/coverage/keuss/playground/pl-rollback.js.html +0 -234
- package/coverage/keuss/playground/pl1.js.html +0 -291
- package/coverage/keuss/playground/q1.js.html +0 -168
- package/coverage/keuss/playground/simple-pl.js.html +0 -195
- package/coverage/keuss/signal/index.html +0 -123
- package/coverage/keuss/signal/local.js.html +0 -306
- package/coverage/keuss/signal/mongo-capped.js.html +0 -378
- package/coverage/keuss/signal/redis-pubsub.js.html +0 -399
- package/coverage/keuss/stats/index.html +0 -123
- package/coverage/keuss/stats/mem.js.html +0 -519
- package/coverage/keuss/stats/mongo.js.html +0 -930
- package/coverage/keuss/stats/redis.js.html +0 -894
- package/coverage/keuss/utils/RedisConn.js.html +0 -150
- package/coverage/keuss/utils/RedisOrderedQueue.js.html +0 -864
- package/coverage/keuss/utils/index.html +0 -110
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -170
- package/docusaurus/README.md +0 -33
- package/docusaurus/babel.config.js +0 -3
- package/docusaurus/blog/2020-08-04-welcome.md +0 -10
- package/docusaurus/docs/about.md +0 -14
- package/docusaurus/docs/api/factory.md +0 -102
- package/docusaurus/docs/api/queue.md +0 -247
- package/docusaurus/docs/api/signal.md +0 -38
- package/docusaurus/docs/api/stats.md +0 -37
- package/docusaurus/docs/changelog.md +0 -51
- package/docusaurus/docs/concepts.md +0 -116
- package/docusaurus/docs/examples.md +0 -10
- package/docusaurus/docs/quickstart.md +0 -195
- package/docusaurus/docs/style-guide.md +0 -202
- package/docusaurus/docs/usage/buckets.md +0 -43
- package/docusaurus/docs/usage/no-signaller.md +0 -16
- package/docusaurus/docs/usage/pipelines/about.md +0 -128
- package/docusaurus/docs/usage/pipelines/building.md +0 -158
- package/docusaurus/docs/usage/pipelines/examples.md +0 -10
- package/docusaurus/docs/usage/pipelines/processors.md +0 -187
- package/docusaurus/docs/usage/putting-all-together.md +0 -153
- package/docusaurus/docs/usage/redis-conns.md +0 -70
- package/docusaurus/docs/usage/shutdown.md +0 -11
- package/docusaurus/docusaurus.config.js +0 -96
- package/docusaurus/package.json +0 -33
- package/docusaurus/sidebars.js +0 -44
- package/docusaurus/src/css/custom.css +0 -25
- package/docusaurus/src/pages/index.js +0 -127
- package/docusaurus/src/pages/styles.module.css +0 -37
- package/docusaurus/static/.nojekyll +0 -0
- package/docusaurus/static/img/favicon.ico +0 -0
- package/docusaurus/static/img/logo.svg +0 -1
- package/docusaurus/yarn.lock +0 -8384
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/build/37637b3c.28c0900b.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/build</a> 37637b3c.28c0900b.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/2</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/2</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/1</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{63:<span class="fstat-no" title="function not covered" >fu</span>nction(s){<span class="cstat-no" title="statement not covered" >s.exports=JSON.parse('{"allTagsPath":"/keuss/blog/tags","slug":"hello","name":"hello","count":1,"permalink":"/keuss/blog/tags/hello"}')}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/build/3d8d21df.2228b429.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/build</a> 3d8d21df.2228b429.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{64:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,r){"use strict";<span class="cstat-no" title="statement not covered" >r.r(t),r.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>)),r.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return i}</span>)),r.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return u}</span>)),r.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >r(2),</span>a=<span class="cstat-no" title="statement not covered" >r(6),</span>o=(<span class="cstat-no" title="statement not covered" >r(0),r(91))</span>,s=<span class="cstat-no" title="statement not covered" >{id:"about",title:"About",sidebar_label:"About"},</span>i=<span class="cstat-no" title="statement not covered" >{unversionedId:"about",id:"about",isDocsHomePage:!0,title:"About",description:"Keuss is an attempt or experiment to provide a serverless, persistent and high-available queue middleware supporting delays/schedule, using mongodb and redis to provide most of the backend needs. As of now, it has evolved into a rather capable and complete queue middleware.",source:"@site/docs/about.md",permalink:"/keuss/docs/",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/about.md",sidebar_label:"About",sidebar:"someSidebar",next:{title:"Quickstart",permalink:"/keuss/docs/quickstart"}},</span>u=<span class="cstat-no" title="statement not covered" >[],</span>l=<span class="cstat-no" title="statement not covered" >{rightToc:u};</span>function <span class="fstat-no" title="function not covered" >c(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>r=<span class="cstat-no" title="statement not covered" >Object(a.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(o.b)("wrapper",Object(n.a)({},l,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"Keuss is an attempt or experiment to provide a serverless, persistent and high-available queue middleware supporting delays/schedule, using mongodb and redis to provide most of the backend needs. As of now, it has evolved into a rather capable and complete queue middleware."),Object(o.b)("p",null,"The underlying idea is that the key to provide persistency, HA and load balance is to rely on a storage subsystem that provides that, and build the rest on top. Instead of reinventing the wheel by building such as storage I simply tried to adapt what's already out there."),Object(o.b)("p",null,"Modelling a queue with mongodb, for example, proved easy enough. It resulted simple, cheap and provides great persistency, HA and decent support for load balancing. Although using Redis provided similar results, in both cases the load balancing part was somewhat incomplete: the whole thing lacked a ",Object(o.b)("em",{parentName:"p"},"bus")," to signal all clients about, for example, when an insertion in a particular queue takes place. Without this layer a certain amount of polling is needed, so it's obviously a Nice Thing To Have."),Object(o.b)("p",null,"Keuss ended up being a somewhat ",Object(o.b)("em",{parentName:"p"},"serverless")," queue system, where the ",Object(o.b)("em",{parentName:"p"},"server")," or common parts are bare storage systems such as redis or mongodb. There is no need for any extra ",Object(o.b)("em",{parentName:"p"},"keuss server")," in between clients and storage (although an actual keuss-server does exist, serving a different purpose on top of plain keuss). Thus, all keuss actually lays at the ",Object(o.b)("em",{parentName:"p"},"client")," side."))}<span class="cstat-no" title="statement not covered" ></span>c.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,r){"use strict";<span class="cstat-no" title="statement not covered" >r.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return p}</span>)),r.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >r(0),</span>a=<span class="cstat-no" title="statement not covered" >r.n(n);</span>function <span class="fstat-no" title="function not covered" >o(</span>e,t,r){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}</span>function <span class="fstat-no" title="function not covered" >s(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,t).enumerable}</span>))),r.push.apply(r,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn r}</span>function <span class="fstat-no" title="function not covered" >i(</span>e){<span class="cstat-no" title="statement not covered" >for(var t=<span class="cstat-no" title="statement not covered" >1;</span>t<arguments.length;t++){var r=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?s(Object(r),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >o(e,t,r[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >u(</span>e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar r,n,a=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar r,n,a=<span class="cstat-no" title="statement not covered" >{},</span>o=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<o.length;n++)<span class="cstat-no" title="statement not covered" >r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn a}</span>(e,t);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var o=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<o.length;n++)<span class="cstat-no" title="statement not covered" >r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn a}</span>var l=<span class="cstat-no" title="statement not covered" >a.a.createContext({}),</span>c=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >a.a.useContext(l),</span>r=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r}</span>,</span>p=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >c(e.components);<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(l.Provider,{value:t},e.children)}</span>,</span>d=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return a.a.createElement(a.a.Fragment,{},t)}</span>},</span>b=<span class="cstat-no" title="statement not covered" >a.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var r=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>o=<span class="cstat-no" title="statement not covered" >e.originalType,</span>s=<span class="cstat-no" title="statement not covered" >e.parentName,</span>l=<span class="cstat-no" title="statement not covered" >u(e,["components","mdxType","originalType","parentName"]),</span>p=<span class="cstat-no" title="statement not covered" >c(r),</span>b=<span class="cstat-no" title="statement not covered" >n,</span>m=<span class="cstat-no" title="statement not covered" >p["".concat(s,".").concat(b)]||p[b]||d[b]||o;<span class="cstat-no" title="statement not covered" ></span>return r?a.a.createElement(m,i(i({ref:t},l),{},{components:r})):a.a.createElement(m,i({ref:t},l))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,t){var r=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var o=<span class="cstat-no" title="statement not covered" >r.length,</span>s=<span class="cstat-no" title="statement not covered" >new Array(o);<span class="cstat-no" title="statement not covered" ></span>s[0]=b;v</span>ar i=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var u in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,u)&&(i[u]=t[u]);<span class="cstat-no" title="statement not covered" >i</span></span>.originalType=e,i.mdxType="string"==typeof e?e:n,s[1]=i;<span class="cstat-no" title="statement not covered" >f</span>or(var l=<span class="cstat-no" title="statement not covered" >2;</span>l<o;l++)<span class="cstat-no" title="statement not covered" >s[l]=r[l];<span class="cstat-no" title="statement not covered" >r</span></span>eturn a.a.createElement.apply(null,s)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a.a.createElement.apply(null,r)}<span class="cstat-no" title="statement not covered" ></span>b.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/build/45a5cd1f.951da354.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/build</a> 45a5cd1f.951da354.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{65:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,a){"use strict";<span class="cstat-no" title="statement not covered" >a.r(t),a.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return b}</span>)),a.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>)),a.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),a.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >a(2),</span>r=<span class="cstat-no" title="statement not covered" >a(6),</span>i=(<span class="cstat-no" title="statement not covered" >a(0),a(91))</span>,b=<span class="cstat-no" title="statement not covered" >{id:"concepts",title:"Concepts",sidebar_label:"Concepts"},</span>c=<span class="cstat-no" title="statement not covered" >{unversionedId:"concepts",id:"concepts",isDocsHomePage:!1,title:"Concepts",description:"Queue",source:"@site/docs/concepts.md",permalink:"/keuss/docs/concepts",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/concepts.md",sidebar_label:"Concepts",sidebar:"someSidebar",previous:{title:"Quickstart",permalink:"/keuss/docs/quickstart"},next:{title:"Bucket-based backends",permalink:"/keuss/docs/usage/buckets"}},</span>l=<span class="cstat-no" title="statement not covered" >[{value:"Queue",id:"queue",children:[]},{value:"Bucket",id:"bucket",children:[]},{value:"Pipeline",id:"pipeline",children:[]},{value:"Processor",id:"processor",children:[]},{value:"Storage",id:"storage",children:[]},{value:"Signaller",id:"signaller",children:[]},{value:"Stats",id:"stats",children:[]},{value:"How all fits together",id:"how-all-fits-together",children:[]}],</span>o=<span class="cstat-no" title="statement not covered" >{rightToc:l};</span>function <span class="fstat-no" title="function not covered" >s(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>a=<span class="cstat-no" title="statement not covered" >Object(r.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(i.b)("wrapper",Object(n.a)({},o,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"queue"},"Queue"),Object(i.b)("p",null,"a ",Object(i.b)("strong",{parentName:"p"},"Queue")," is more of an interface, a definition of what it can do. Keuss queues are capable of:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Insert one element."),Object(i.b)("li",{parentName:"ul"},"Schedule an element: insert one element with a not-before datetime."),Object(i.b)("li",{parentName:"ul"},"Get an element, and block for some specified time if no element is available."),Object(i.b)("li",{parentName:"ul"},"Reserve an element, and block for some specified time if no element is available."),Object(i.b)("li",{parentName:"ul"},"Commit (remove) or rollback (return back) a previously reserved element."),Object(i.b)("li",{parentName:"ul"},"Get element count."),Object(i.b)("li",{parentName:"ul"},"Get element count whose not-before datetime is in the future (scheduled elements)."),Object(i.b)("li",{parentName:"ul"},"Get usage stats: elements inserted, elements extracted.")),Object(i.b)("p",null,Object(i.b)("em",{parentName:"p"},"Element")," here translates to any js object. Internally, it's usually managed as json."),Object(i.b)("h2",{id:"bucket"},"Bucket"),Object(i.b)("p",null,"The initial idea for Keuss Queues, transtated the elements inserted in the queue into rows of the backed storage. This makes it easy to inspect the elements values directly in the backend, which is pretty useful when you need to debug things up. Buckets came later, as a way to pack more than one message into a single row of the backend to gain performance. See ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"usage/buckets"}),"Bucked-based backends"),"."),Object(i.b)("h2",{id:"pipeline"},"Pipeline"),Object(i.b)("p",null,"A ",Object(i.b)("strong",{parentName:"p"},Object(i.b)("a",Object(n.a)({parentName:"strong"},{href:"usage/pipelines"}),"pipeline"))," is an enhanced queue that provides an extra operation: pass an element to another queue ",Object(i.b)("strong",{parentName:"p"},"atomically"),". In an scenario where processors are linked with queues, it is usually a good feature to allow the ",Object(i.b)("em",{parentName:"p"},"'commit element in incoming queue, insert element in the next queue'")," to be atomic. This removes chances for race conditions, or message losses."),Object(i.b)("p",null,"The pipeline concept is, indeed, an extension of the reserve-commit model; it is so far implemented only atop mongodb, and it is anyway considered as a 'low-level' feature, best used by means of specialized classes to encapsulate the aforementioned processors."),Object(i.b)("h2",{id:"processor"},"Processor"),Object(i.b)("p",null,"A ",Object(i.b)("strong",{parentName:"p"},"processor")," is an object tied to one or more queues, that controls the flow of messages between them. They are used mainly to define ",Object(i.b)("strong",{parentName:"p"},"pipelines"),". Currently there are 4 specialized classes of processors defined:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"usage/pipelines#baselink"}),"BaseLink"),": This is really more of a base definition for the rest of the specialized processors."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"usage/pipelines#directlink"}),"DirectLink")," (one queue to another)."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"usage/pipelines#choicelink"}),"ChoiceLink")," (one queue to one or more queues)."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"usage/pipelines#sink"}),"Sink")," (endpoint, one queue to none).")),Object(i.b)("h2",{id:"storage"},"Storage"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Storage")," or ",Object(i.b)("strong",{parentName:"p"},"Backend")," provides almost-complete queue primitives, fully functional and already usable as is. Keuss comes with 7 backends, with various levels of features and performance:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo")),", a mongodb-based backend that provides the full set of queue features, still with decent performance."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"redis-oq")),", backed using an ordered queue on top of redis (made in turn with a sorted set, a hash and some lua). Provides all queue features including reserve-commit-rollback. Noticeable faster than mongodb."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"redis-list")),", backed using a redis list. Does not offer reserve-commit-rollback nor the ability to schedule, but is much faster than redis-oq"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"pl-mongo")),", a version of the ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo"))," backend that provides pipelining capabilities (the queues it produces are also pipelines)."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"ps-mongo")),", a version of the ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo"))," backend where elements are not physically deleted from the collection when extracted; instead, they are just marked as processed and later deleted automatically using a mongodb TTL index."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"bucket-mongo")),", a first attepmt on storing more than one element on each mongodb record in order to break past mongodb I/O limitations. It is very simple, lacking schedule and reserve support. However, it has staggering throughput on a reasonable durability."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"bucket-mongo-safe")),", an evolution of ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"bucket-mongo")),", provides both scheduling and reserve support with a performance only a bit below ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"bucket-mongo")),".")),Object(i.b)("p",null,"As mentioned before, persistence and High Availability (HA) depends exclusively on the underliying system: mongodb provides production-grade HA and persistence while using potentially gigantic queues, and with redis one can balance performance and simplicity over reliability and durability, by using standalone redis, redis sentinel or redis cluster. Keuss uses ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/luin/ioredis"}),"ioredis")," as redis driver, which supports all 3 cases."),Object(i.b)("p",null,"The following table shows the capabilities of each backend:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"backend"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:"center"}),"delay/schedule"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:"center"}),"reserve/commit"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:"center"}),"pipelining"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:"center"}),"history"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:"center"}),"throughput"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"redis-list"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"++++")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"redis-oq"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"+++")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"mongo"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"++")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"pl-mongo"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"+")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"ps-mongo"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"++")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"bucket-mongo"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"+++++")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"bucket-mongo-safe"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"x"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"-"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:"center"}),"+++++")))),Object(i.b)("h2",{id:"signaller"},"Signaller"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Signaller")," provides a bus interconnecting all keuss clients, so events can be shared. Keuss provides 3 signallers:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"local"))," : provides in-proccess messaging, useful only for simple cases or testing"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"redis-pubsub")),": uses the pubsub subsystem provided by redis"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo-capped")),": uses pubsub on top of a mongodb capped collection, using ",Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"https://www.npmjs.com/package/@nodebb/mubsub"}),"@nodebb/mubsub"))),Object(i.b)("p",null,"So far, the only events published by keuss are:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},"element inserted in queue X"),", which allows other clients waiting for elements to be available to wake up and retry. A client will not fire an event if\nanother one of the same type (same client, same queue) was already fired less than 50ms ago."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},"queue X paused/resumed"),".")),Object(i.b)("p",null,"The use of a signaller provider different from ",Object(i.b)("inlineCode",{parentName:"p"},"local")," allows the formation of a cluster of clients: all those clients sharing the same signaller object\n(with the same configuration, obviously) will see and share the same set of events and therefore can collaborate (for example, all consumers of a given\nqueue ",Object(i.b)("em",{parentName:"p"},"on every machine")," will be awaken when an insertion happens ",Object(i.b)("em",{parentName:"p"},"on any machine"),")"),Object(i.b)("h2",{id:"stats"},"Stats"),Object(i.b)("p",null,Object(i.b)("strong",{parentName:"p"},"Stats")," provides counters and metrics on queues, shared among keuss clients. The supported stats are:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Elements put"),Object(i.b)("li",{parentName:"ul"},"Elements got"),Object(i.b)("li",{parentName:"ul"},"Paused status")),Object(i.b)("p",null,"Three options are provided to store the stats:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mem")),": very simple in-process, memory based."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"redis")),": backed by redis hashes. Modifications are buffered in memory and flushed every 100ms."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo")),": backed by mongodb using one object per queue inside a single collection. Modifications are buffered in memory and flushed every 100ms.")),Object(i.b)("p",null,"The use of a stats provider different from ",Object(i.b)("inlineCode",{parentName:"p"},"mem")," allows for a shared view of a cluster of clients: all those clients sharing the same stats object\n(with the same configuration, obviously) will see a coherent, aggregated view of the stats (all clients will update the stats)"),Object(i.b)("p",null,"The stats can also be used as a queue discovery source: existing queues can be recreated from the information stored (in fact, extra information\nneeded to ensure this is also stored alongside the actual stats). Keuss does not, at this point, provide any actual ",Object(i.b)("em",{parentName:"p"},"recreate")," functionality on\ntop of this"),Object(i.b)("h2",{id:"how-all-fits-together"},"How all fits together"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"Queues")),", or rather clients to individual queues, are created using a ",Object(i.b)("em",{parentName:"li"},"backend")," as factory."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"Backends"))," need to be initialized before being used. Exact initialization details depend on each backend."),Object(i.b)("li",{parentName:"ul"},"When creating a ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"queue")),", a ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"signaller"))," and a ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"stats"))," are assigned to it. The actual class/type to be used can be specified at the queue's creation moment, or at the backend initialization moment. By default ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"local"))," and ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mem")),", respectively, are used for redis-based backends; for mongodb-based backends, ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo-capped"))," and ",Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"mongo"))," are used intead as defaults"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"Queues"))," are created on-demand, and are never destroyed as far as Keuss is concerned. They do exist as long as the underlying backend kepts them in existence: for example, redis queues dissapear as such when they become empty."),Object(i.b)("li",{parentName:"ul"},Object(i.b)("em",{parentName:"li"},Object(i.b)("inlineCode",{parentName:"em"},"Pipelines"))," are, strictly speaking, just enhanced queues; as such they behave and can be used as a queue. More info on pipelines ",Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"/keuss/docs/usage/pipelines"}),"here"))))}<span class="cstat-no" title="statement not covered" ></span>s.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,a){"use strict";<span class="cstat-no" title="statement not covered" >a.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>)),a.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return d}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >a(0),</span>r=<span class="cstat-no" title="statement not covered" >a.n(n);</span>function <span class="fstat-no" title="function not covered" >i(</span>e,t,a){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}</span>function <span class="fstat-no" title="function not covered" >b(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,t).enumerable}</span>))),a.push.apply(a,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a}</span>function <span class="fstat-no" title="function not covered" >c(</span>e){<span class="cstat-no" title="statement not covered" >for(var t=<span class="cstat-no" title="statement not covered" >1;</span>t<arguments.length;t++){var a=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?b(Object(a),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >i(e,t,a[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >l(</span>e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar a,n,r=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar a,n,r=<span class="cstat-no" title="statement not covered" >{},</span>i=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<i.length;n++)<span class="cstat-no" title="statement not covered" >a=i[n],t.indexOf(a)>=0||(r[a]=e[a]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn r}</span>(e,t);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var i=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<i.length;n++)<span class="cstat-no" title="statement not covered" >a=i[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn r}</span>var o=<span class="cstat-no" title="statement not covered" >r.a.createContext({}),</span>s=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >r.a.useContext(o),</span>a=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a}</span>,</span>m=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >s(e.components);<span class="cstat-no" title="statement not covered" ></span>return r.a.createElement(o.Provider,{value:t},e.children)}</span>,</span>p=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return r.a.createElement(r.a.Fragment,{},t)}</span>},</span>u=<span class="cstat-no" title="statement not covered" >r.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var a=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>i=<span class="cstat-no" title="statement not covered" >e.originalType,</span>b=<span class="cstat-no" title="statement not covered" >e.parentName,</span>o=<span class="cstat-no" title="statement not covered" >l(e,["components","mdxType","originalType","parentName"]),</span>m=<span class="cstat-no" title="statement not covered" >s(a),</span>u=<span class="cstat-no" title="statement not covered" >n,</span>d=<span class="cstat-no" title="statement not covered" >m["".concat(b,".").concat(u)]||m[u]||p[u]||i;<span class="cstat-no" title="statement not covered" ></span>return a?r.a.createElement(d,c(c({ref:t},o),{},{components:a})):r.a.createElement(d,c({ref:t},o))}</span>));</span>function <span class="fstat-no" title="function not covered" >d(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var i=<span class="cstat-no" title="statement not covered" >a.length,</span>b=<span class="cstat-no" title="statement not covered" >new Array(i);<span class="cstat-no" title="statement not covered" ></span>b[0]=u;v</span>ar c=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var l in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,l)&&(c[l]=t[l]);<span class="cstat-no" title="statement not covered" >c</span></span>.originalType=e,c.mdxType="string"==typeof e?e:n,b[1]=c;<span class="cstat-no" title="statement not covered" >f</span>or(var o=<span class="cstat-no" title="statement not covered" >2;</span>o<i;o++)<span class="cstat-no" title="statement not covered" >b[o]=a[o];<span class="cstat-no" title="statement not covered" >r</span></span>eturn r.a.createElement.apply(null,b)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn r.a.createElement.apply(null,a)}<span class="cstat-no" title="statement not covered" ></span>u.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Code coverage report for keuss/docusaurus/build/52c38f7a.785707bc.js</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
7
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<style type='text/css'>
|
|
10
|
-
.coverage-summary .sorter {
|
|
11
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<div class='wrapper'>
|
|
17
|
-
<div class='pad1'>
|
|
18
|
-
<h1>
|
|
19
|
-
<a href="../../../index.html">All files</a> / <a href="index.html">keuss/docusaurus/build</a> 52c38f7a.785707bc.js
|
|
20
|
-
</h1>
|
|
21
|
-
<div class='clearfix'>
|
|
22
|
-
<div class='fl pad1y space-right2'>
|
|
23
|
-
<span class="strong">0% </span>
|
|
24
|
-
<span class="quiet">Statements</span>
|
|
25
|
-
<span class='fraction'>0/88</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class='fl pad1y space-right2'>
|
|
28
|
-
<span class="strong">0% </span>
|
|
29
|
-
<span class="quiet">Branches</span>
|
|
30
|
-
<span class='fraction'>0/45</span>
|
|
31
|
-
</div>
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Functions</span>
|
|
35
|
-
<span class='fraction'>0/22</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class='fl pad1y space-right2'>
|
|
38
|
-
<span class="strong">0% </span>
|
|
39
|
-
<span class="quiet">Lines</span>
|
|
40
|
-
<span class='fraction'>0/1</span>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<p class="quiet">
|
|
44
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
<div class='status-line low'></div>
|
|
48
|
-
<pre><table class="coverage">
|
|
49
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{66:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,a){"use strict";<span class="cstat-no" title="statement not covered" >a.r(t),a.d(t,"frontMatter",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return l}</span>)),a.d(t,"metadata",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return o}</span>)),a.d(t,"rightToc",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return c}</span>)),a.d(t,"default",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return s}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >a(2),</span>i=<span class="cstat-no" title="statement not covered" >a(6),</span>r=(<span class="cstat-no" title="statement not covered" >a(0),a(91))</span>,l=<span class="cstat-no" title="statement not covered" >{id:"factory",title:"Factory API",sidebar_label:"Factory"},</span>o=<span class="cstat-no" title="statement not covered" >{unversionedId:"api/factory",id:"api/factory",isDocsHomePage:!1,title:"Factory API",description:"Backends, which work as queue factories, have the following operations:",source:"@site/docs/api/factory.md",permalink:"/keuss/docs/api/factory",editUrl:"https://github.com/pepmartinez/keuss/edit/master/website/docs/api/factory.md",sidebar_label:"Factory",sidebar:"someSidebar",previous:{title:"Pipelines",permalink:"/keuss/docs/usage/pipelines"},next:{title:"Signaller API",permalink:"/keuss/docs/api/signal"}},</span>c=<span class="cstat-no" title="statement not covered" >[{value:"<code>MQ</code>: Factory initialization",id:"mq-factory-initialization",children:[{value:"MongoDB defaults",id:"mongodb-defaults",children:[]},{value:"Dead Letter",id:"dead-letter",children:[]}]},{value:"<code>queue</code>: Queue creation",id:"queue-queue-creation",children:[]},{value:"<code>close</code>: Factory close",id:"close-factory-close",children:[]}],</span>b=<span class="cstat-no" title="statement not covered" >{rightToc:c};</span>function <span class="fstat-no" title="function not covered" >s(</span>e){var t=<span class="cstat-no" title="statement not covered" >e.components,</span>a=<span class="cstat-no" title="statement not covered" >Object(i.a)(e,["components"]);<span class="cstat-no" title="statement not covered" ></span>return Object(r.b)("wrapper",Object(n.a)({},b,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Backends, which work as queue factories, have the following operations:"),Object(r.b)("h2",{id:"mq-factory-initialization"},Object(r.b)("inlineCode",{parentName:"h2"},"MQ"),": Factory initialization"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var QM = require ('keuss/backends/<backend>');\n\nMQ (opts, (err, factory) => {\n // factory contains the actual factory, initialized\n})\n")),Object(r.b)("p",null,"where ",Object(r.b)("inlineCode",{parentName:"p"},"opts")," is an object containing initialization options. Common properties to all backends are:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"name"),": Name for the factory, defaults to 'N'."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"stats"),":",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"provider"),": stats backend to use, as result of ",Object(r.b)("inlineCode",{parentName:"li"},"require ('keuss/stats/<provider>')"),". Defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"require ('keuss/stats/mem')"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts"),": options for the provider."))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"signaller"),":",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"provider"),": signaller provider to use, as result of ",Object(r.b)("inlineCode",{parentName:"li"},"require ('keuss/signal/<provider>')"),". Defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"require ('keuss/signal/local')"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts"),": options for the provider."))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"deadletter"),": deadletter options, described below.",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"max_ko"),": max rollbacks per element."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"queue"),": deadletter queue name.")))),Object(r.b)("p",null,"The following are backend-dependent values:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"backends ",Object(r.b)("em",{parentName:"li"},"mongo"),", ",Object(r.b)("em",{parentName:"li"},"pl-mongo")," and ",Object(r.b)("em",{parentName:"li"},"ps-mongo"),".",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"url"),": mongodb url to use, defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"mongodb://localhost:27017/keuss"),"."))),Object(r.b)("li",{parentName:"ul"},"backends ",Object(r.b)("em",{parentName:"li"},"redis-list")," and ",Object(r.b)("em",{parentName:"li"},"redis-oq"),".",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"redis"),": data to create a redis connection to the Redis acting as backend, see below."))),Object(r.b)("li",{parentName:"ul"},"backend ",Object(r.b)("em",{parentName:"li"},"ps-mongo"),".",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"ttl"),": time to keep consumed elements in the collection after being removed. Defauls to 3600 secs.")))),Object(r.b)("h3",{id:"mongodb-defaults"},"MongoDB defaults"),Object(r.b)("p",null,"On MongoDB-based backends, ",Object(r.b)("inlineCode",{parentName:"p"},"signaller")," and ",Object(r.b)("inlineCode",{parentName:"p"},"stats")," defaults to:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"signaller"),": uses ",Object(r.b)("inlineCode",{parentName:"li"},"mongo-capped"),", using the same mongodb url than the backend, but postfixing the db with ",Object(r.b)("inlineCode",{parentName:"li"},"_signal"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"stats"),": uses ",Object(r.b)("inlineCode",{parentName:"li"},"mongo-capped"),", using the same mongodb url than the backend, but postfixing the db with ",Object(r.b)("inlineCode",{parentName:"li"},"_stats"),".\nThis alows cleaner and more concise initialization, using a sane default.")),Object(r.b)("h3",{id:"dead-letter"},"Dead Letter"),Object(r.b)("p",null,"The concept of ",Object(r.b)("em",{parentName:"p"},"deadletter")," is very common on queue middlewares: in case reserve/commit/rollback is used to consume, a maximum number of fails (reserve-rollback) can be set on each element; if an element sees more rollbacks than allowed, the element is moved to an special queue (dead letter queue) for later, offline inspection."),Object(r.b)("p",null,"By default, keuss uses no deadletter queue; it can be activated by passing a ",Object(r.b)("inlineCode",{parentName:"p"},"deadletter")," object at the time of factory creation, in the options:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"var factory_opts = {\n url: 'mongodb://localhost/qeus',\n deadletter: {\n max_ko: 3\n }\n};\n\n// initialize factory\nMQ(factory_opts, (err, factory) => {\n ...\n")),Object(r.b)("p",null,"This object must not be empty, and can contain the following keys:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"max_ko"),": maximum number of rollbacks per element allowed. The next rollback will cause the element to be moved to the deadletter queue. Defaults to 0, which means ",Object(r.b)("inlineCode",{parentName:"li"},"infinite"),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"queue"),": queue name of the deadletter queue, defaults to ",Object(r.b)("inlineCode",{parentName:"li"},"__deadletter__"),".")),Object(r.b)("div",{className:"admonition admonition-tip alert alert--success"},Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(n.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(n.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(r.b)("path",Object(n.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})))),"tip")),Object(r.b)("div",Object(n.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},"All storage backends support deadletter. In ",Object(r.b)("inlineCode",{parentName:"p"},"ps-mongo")," the move-to-deadletter (as it is the case with other move-to-queue operations) is atomic; in the rest, the element is first committed in the original queue and then pushed inside deadletter."))),Object(r.b)("h2",{id:"queue-queue-creation"},Object(r.b)("inlineCode",{parentName:"h2"},"queue"),": Queue creation"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"// factory has been initialized\nvar q = factory.queue (<name>, <options>);\n")),Object(r.b)("p",null,"Where:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"name"),": string to be used as queue name. Queues with the same name are in fact the same queue if they're backed in the same factory type using the same initialization data (mongodb url or redis conn-data)."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"options"),": the options passed at backend initialization are used as default values:",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"pollInterval: rearm or poll period in millisecs for get operations, defaults to 15000 (see ",Object(r.b)("a",Object(n.a)({parentName:"li"},{href:"../usage/no-signaller"}),"Working with no signallers"),")."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"signaller"),": signaller to use for the queue.",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"provider"),": signaller factory."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts"),": options for the signaller factory (see ",Object(r.b)("a",Object(n.a)({parentName:"li"},{href:"signal"}),"Signaler"),")."))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"stats"),": stats store to use for this queue.",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"provider"),": stats factory."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("inlineCode",{parentName:"li"},"opts"),": options for the stats factory (see below).")))))),Object(r.b)("h2",{id:"close-factory-close"},Object(r.b)("inlineCode",{parentName:"h2"},"close"),": Factory close"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{className:"language-javascript"}),"factory.close (err => {...});\n")),Object(r.b)("p",null,"Frees up resources on the factory. Queues created with the factory will become unusable afterwards. See ",Object(r.b)("a",Object(n.a)({parentName:"p"},{href:"/keuss/docs/usage/shutdown"}),"'Shutdown process'")," for more info."))}<span class="cstat-no" title="statement not covered" ></span>s.isMDXComponent=!0}</span>,91:<span class="fstat-no" title="function not covered" >fu</span>nction(e,t,a){"use strict";<span class="cstat-no" title="statement not covered" >a.d(t,"a",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return u}</span>)),a.d(t,"b",(<span class="fstat-no" title="function not covered" >fu</span>nction(){<span class="cstat-no" title="statement not covered" >return m}</span>));v</span>ar n=<span class="cstat-no" title="statement not covered" >a(0),</span>i=<span class="cstat-no" title="statement not covered" >a.n(n);</span>function <span class="fstat-no" title="function not covered" >r(</span>e,t,a){<span class="cstat-no" title="statement not covered" >return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}</span>function <span class="fstat-no" title="function not covered" >l(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var n=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>t&&(n=n.filter((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >return Object.getOwnPropertyDescriptor(e,t).enumerable}</span>))),a.push.apply(a,n)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn a}</span>function <span class="fstat-no" title="function not covered" >o(</span>e){<span class="cstat-no" title="statement not covered" >for(var t=<span class="cstat-no" title="statement not covered" >1;</span>t<arguments.length;t++){var a=<span class="cstat-no" title="statement not covered" >null!=arguments[t]?arguments[t]:{};<span class="cstat-no" title="statement not covered" ></span>t%2?l(Object(a),!0).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >r(e,t,a[t])}</span>)):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((<span class="fstat-no" title="function not covered" >fu</span>nction(t){<span class="cstat-no" title="statement not covered" >Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}</span>))}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn e}</span>function <span class="fstat-no" title="function not covered" >c(</span>e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar a,n,i=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e,t){<span class="cstat-no" title="statement not covered" >if(null==e)<span class="cstat-no" title="statement not covered" >return{};v</span></span>ar a,n,i=<span class="cstat-no" title="statement not covered" >{},</span>r=<span class="cstat-no" title="statement not covered" >Object.keys(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<r.length;n++)<span class="cstat-no" title="statement not covered" >a=r[n],t.indexOf(a)>=0||(i[a]=e[a]);<span class="cstat-no" title="statement not covered" >r</span></span>eturn i}</span>(e,t);<span class="cstat-no" title="statement not covered" ></span>if(Object.getOwnPropertySymbols){var r=<span class="cstat-no" title="statement not covered" >Object.getOwnPropertySymbols(e);<span class="cstat-no" title="statement not covered" ></span>for(n=0;n<r.length;n++)<span class="cstat-no" title="statement not covered" >a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}<span class="cstat-no" title="statement not covered" ></span></span>r</span>eturn i}</span>var b=<span class="cstat-no" title="statement not covered" >i.a.createContext({}),</span>s=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >i.a.useContext(b),</span>a=<span class="cstat-no" title="statement not covered" >t;<span class="cstat-no" title="statement not covered" ></span>return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a}</span>,</span>u=<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >s(e.components);<span class="cstat-no" title="statement not covered" ></span>return i.a.createElement(b.Provider,{value:t},e.children)}</span>,</span>p=<span class="cstat-no" title="statement not covered" >{inlineCode:"code",wrapper:<span class="fstat-no" title="function not covered" >fu</span>nction(e){var t=<span class="cstat-no" title="statement not covered" >e.children;<span class="cstat-no" title="statement not covered" ></span>return i.a.createElement(i.a.Fragment,{},t)}</span>},</span>d=<span class="cstat-no" title="statement not covered" >i.a.forwardRef((<span class="fstat-no" title="function not covered" >fu</span>nction(e,t){var a=<span class="cstat-no" title="statement not covered" >e.components,</span>n=<span class="cstat-no" title="statement not covered" >e.mdxType,</span>r=<span class="cstat-no" title="statement not covered" >e.originalType,</span>l=<span class="cstat-no" title="statement not covered" >e.parentName,</span>b=<span class="cstat-no" title="statement not covered" >c(e,["components","mdxType","originalType","parentName"]),</span>u=<span class="cstat-no" title="statement not covered" >s(a),</span>d=<span class="cstat-no" title="statement not covered" >n,</span>m=<span class="cstat-no" title="statement not covered" >u["".concat(l,".").concat(d)]||u[d]||p[d]||r;<span class="cstat-no" title="statement not covered" ></span>return a?i.a.createElement(m,o(o({ref:t},b),{},{components:a})):i.a.createElement(m,o({ref:t},b))}</span>));</span>function <span class="fstat-no" title="function not covered" >m(</span>e,t){var a=<span class="cstat-no" title="statement not covered" >arguments,</span>n=<span class="cstat-no" title="statement not covered" >t&&t.mdxType;<span class="cstat-no" title="statement not covered" ></span>if("string"==typeof e||n){var r=<span class="cstat-no" title="statement not covered" >a.length,</span>l=<span class="cstat-no" title="statement not covered" >new Array(r);<span class="cstat-no" title="statement not covered" ></span>l[0]=d;v</span>ar o=<span class="cstat-no" title="statement not covered" >{};<span class="cstat-no" title="statement not covered" ></span>for(var c in t)<span class="cstat-no" title="statement not covered" >hasOwnProperty.call(t,c)&&(o[c]=t[c]);<span class="cstat-no" title="statement not covered" >o</span></span>.originalType=e,o.mdxType="string"==typeof e?e:n,l[1]=o;<span class="cstat-no" title="statement not covered" >f</span>or(var b=<span class="cstat-no" title="statement not covered" >2;</span>b<r;b++)<span class="cstat-no" title="statement not covered" >l[b]=a[b];<span class="cstat-no" title="statement not covered" >r</span></span>eturn i.a.createElement.apply(null,l)}<span class="cstat-no" title="statement not covered" ></span>r</span>eturn i.a.createElement.apply(null,a)}<span class="cstat-no" title="statement not covered" ></span>d.displayName="MDXCreateElement"}</span>}]);</span></pre></td></tr>
|
|
50
|
-
</table></pre>
|
|
51
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
52
|
-
</div><!-- /wrapper -->
|
|
53
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
54
|
-
Code coverage
|
|
55
|
-
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sun Aug 30 2020 20:39:29 GMT+0200 (GMT+02:00)
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<script src="../../../prettify.js"></script>
|
|
59
|
-
<script>
|
|
60
|
-
window.onload = function () {
|
|
61
|
-
if (typeof prettyPrint === 'function') {
|
|
62
|
-
prettyPrint();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<script src="../../../sorter.js"></script>
|
|
67
|
-
<script src="../../../block-navigation.js"></script>
|
|
68
|
-
</body>
|
|
69
|
-
</html>
|