qrusty-client 0.15.0 → 0.16.0
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/README.md +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ const client = new QrustyClient("http://localhost:6784");
|
|
|
27
27
|
(async () => {
|
|
28
28
|
await client.createQueue("orders", "MaxFirst", true);
|
|
29
29
|
await client.publish("orders", 100, { order_id: 123 });
|
|
30
|
+
|
|
31
|
+
// Text priorities are also supported for queues with priority_kind: "Text"
|
|
32
|
+
await client.createQueue("tags", "MinFirst", true, "Text");
|
|
33
|
+
await client.publish("tags", "alpha", { tag: "first" });
|
|
30
34
|
const msg = await client.consume("orders", "worker-1");
|
|
31
35
|
if (msg) {
|
|
32
36
|
await client.ack("orders", msg.id, "worker-1");
|