redis-smq 8.0.0-rc.7 → 8.0.0-rc.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
 
2
2
 
3
+ ## [8.0.0-rc.9](https://github.com/weyoss/redis-smq/compare/v8.0.0-rc.8...v8.0.0-rc.9) (2023-12-11)
4
+
5
+
6
+ ### Documentation
7
+
8
+ * update documentation ([85d6adb](https://github.com/weyoss/redis-smq/commit/85d6adb7e8db6cb4f427a34e8e510c11d2fc5bf0))
9
+
10
+
11
+ ### Codebase Refactoring
12
+
13
+ * **MessageEnvelope:** improve setPriority/getPriority typings ([91c44f0](https://github.com/weyoss/redis-smq/commit/91c44f013d6ff757876a0e57dcec45869ab6a02a))
14
+
15
+
16
+ ### Tests
17
+
18
+ * **MessageEnvelope:** improve setPriority/getPriority typings ([20fd6e5](https://github.com/weyoss/redis-smq/commit/20fd6e58e466ae425bba54d4d85adf4df888654b))
19
+
20
+ ## [8.0.0-rc.8](https://github.com/weyoss/redis-smq/compare/v8.0.0-rc.7...v8.0.0-rc.8) (2023-12-11)
21
+
22
+
23
+ ### ⚠ BREAKING CHANGES
24
+
25
+ * **Message:** remove Message.MessagePriority, add EMessagePriority
26
+ * **QueueMessages:** move message methods to Message,add MessageEnvelope
27
+
28
+ ### Features
29
+
30
+ * **Message:** add getMessageStatus() method ([fda81fa](https://github.com/weyoss/redis-smq/commit/fda81fa7a3c4428799dfabef8581f0f3b39949e8))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **Message:** export missing error classes ([29e8817](https://github.com/weyoss/redis-smq/commit/29e8817fa805faed42ebd9a3fea469004552eec1))
36
+
37
+
38
+ ### Documentation
39
+
40
+ * update documentation and examples ([8efb082](https://github.com/weyoss/redis-smq/commit/8efb08200ac1f2751c7e10e3492445badb2e4039))
41
+
42
+
43
+ ### Codebase Refactoring
44
+
45
+ * **Message:** remove Message.MessagePriority, add EMessagePriority ([702a01d](https://github.com/weyoss/redis-smq/commit/702a01da987479a4f3b2127b9da0851d74046c10))
46
+ * **QueueMessages:** move message methods to Message,add MessageEnvelope ([f71f0d0](https://github.com/weyoss/redis-smq/commit/f71f0d06240e16b1519ae175793ae28470684d4f))
47
+
48
+
49
+ ### Tests
50
+
51
+ * **Message:** add getMessageStatus() method ([76e97c4](https://github.com/weyoss/redis-smq/commit/76e97c48fdc86c2709db39b17a0ba55432157270))
52
+ * **Message:** remove Message.MessagePriority, add EMessagePriority ([88a1368](https://github.com/weyoss/redis-smq/commit/88a1368ff8e000f3f26141ec29fddc7f96a7103e))
53
+ * **QueueMessages:** move message methods to Message,add MessageEnvelope ([932a88e](https://github.com/weyoss/redis-smq/commit/932a88eee5bfd0dc020c8516f76e2d351d486fe3))
54
+
3
55
  ## [8.0.0-rc.7](https://github.com/weyoss/redis-smq/compare/v8.0.0-rc.6...v8.0.0-rc.7) (2023-12-09)
4
56
 
5
57
 
@@ -183,8 +235,6 @@
183
235
  * drop support for redis server 2.8 and 3 ([9ef8ade](https://github.com/weyoss/redis-smq/commit/9ef8adec08bf90d1cc27b9bbabe591bca25a7d8e))
184
236
  * update minimal supported versions for nodejs and redis ([13b3197](https://github.com/weyoss/redis-smq/commit/13b31977937c65aa989de8d715022d1afb5f0839))
185
237
 
186
- # CHANGELOG
187
-
188
238
  ## 7.2.3 (2023-03-26)
189
239
 
190
240
  * test(consumer-heartbeat): update tests (4332153)
package/README.md CHANGED
@@ -19,10 +19,10 @@ RedisSMQ is a Node.js library for queuing messages (aka jobs) and processing the
19
19
 
20
20
  * [High-performance message processing](docs/performance.md).
21
21
  * Flexible Producer/Consumer model which offers [Multi-Queue Producers](docs/producing-messages.md) & [Multi-Queue Consumers](docs/consuming-messages.md), focuses on simplicity and without tons of features. This makes RedisSMQ an ideal message broker for microservices-based applications.
22
- * In case of failures, while delivering or processing a message, RedisSMQ can guaranty that the message is not lost and that it is redelivered [at-least-once](docs/api/classes/Message.md#setretrythreshold). When configured to do so, RedisSMQ can also ensure that the message is delivered [at-most-once](docs/api/classes/Message.md#setretrythreshold).
22
+ * In case of failures, while delivering or processing a message, RedisSMQ can guaranty that the message is not lost and that it is redelivered [at-least-once](docs/api/classes/MessageEnvelope.md#setretrythreshold). When configured to do so, RedisSMQ can also ensure that the message is delivered [at-most-once](docs/api/classes/MessageEnvelope.md#setretrythreshold).
23
23
  * RedisSMQ offers different exchange types: [Direct Exchange](docs/message-exchanges.md#direct-exchange), [Topic Exchange](docs/message-exchanges.md#topic-exchange), and [FanOut Exchange](docs/message-exchanges.md#fanout-exchange) for publishing a message to one or multiple queues.
24
24
  * 3 queuing strategies that you may use depending on your needs and requirements: [FIFO queues, LIFO queues, and Reliable Priority Queues](docs/queues.md).
25
- * A message can be [set to expire](docs/api/classes/Message.md#setttl) if it has not been delivered within a given amount of time. [Consumption timeout](docs/api/classes/Message.md#setconsumetimeout) allows canceling a message consumption if a consumer did not acknowledge the message for a period of time.
25
+ * A message can be [set to expire](docs/api/classes/MessageEnvelope.md#setttl) if it has not been delivered within a given amount of time. [Consumption timeout](docs/api/classes/MessageEnvelope.md#setconsumetimeout) allows canceling a message consumption if a consumer did not acknowledge the message for a period of time.
26
26
  * [Queue Rate Limiting](docs/queue-rate-limiting.md) which allows to control the rate at which the messages are consumed from a given queue.
27
27
  * Builtin [message scheduler](docs/scheduling-messages.md) allowing to delay a message, to deliver a message for N times with an optional period between deliveries, or simply to schedule message delivery using CRON expressions.
28
28
  * [Multiplexing](/docs/multiplexing.md): A feature which allows message handlers to use a single redis connection to dequeue and consume messages.
@@ -56,7 +56,7 @@ Considerations:
56
56
 
57
57
  ## Usage
58
58
 
59
- RedisSMQ provides 3 classes in order to work with the message queue: `Message`, `Producer`, and `Consumer`.
59
+ RedisSMQ provides 3 classes in order to work with the message queue: `MessageEnvelope`, `Producer`, and `Consumer`.
60
60
 
61
61
  Producers and consumers exchange data using one or multiple queues that may be created using the [Queue Class](docs/api/classes/Queue.md).
62
62
 
@@ -76,14 +76,14 @@ queue.save('my_queue', EQueueType.LIFO_QUEUE, (err) => console.log(err));
76
76
  ### Producing a message
77
77
 
78
78
  ```javascript
79
- const { Producer, Message } = require('redis-smq');
79
+ const { Producer, MessageEnvelope } = require('redis-smq');
80
80
 
81
81
  const producer = new Producer();
82
82
 
83
- const message = new Message();
84
- message.setQueue('my_queue').setBody('Hello Word!')
83
+ const msg = new MessageEnvelope();
84
+ msg.setQueue('my_queue').setBody('Hello Word!')
85
85
 
86
- producer.produce(message, (err) => console.log(err));
86
+ producer.produce(msg, (err) => console.log(err));
87
87
  ```
88
88
 
89
89
  ### Consuming a message
@@ -92,8 +92,8 @@ producer.produce(message, (err) => console.log(err));
92
92
  const { Consumer } = require('redis-smq');
93
93
 
94
94
  const consumer = new Consumer();
95
- const messageHandler = (message, cb) => {
96
- console.log(message.getBody());
95
+ const messageHandler = (msg, cb) => {
96
+ console.log(msg.getBody());
97
97
  cb();
98
98
  }
99
99
  consumer.consume('my_queue', messageHandler, (err) => console.log(err));