redis-smq 7.0.0-rc.4 → 7.0.0-rc.5
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
package/README.md
CHANGED
|
@@ -19,19 +19,19 @@ RedisSMQ is a Node.js library for queuing messages (aka jobs) and processing the
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
* **[High-performance message processing](docs/performance.md)**
|
|
22
|
+
* **[High-performance message processing](/docs/performance.md)**
|
|
23
23
|
* **[Multi-Queue Producers](#producer-class) & [Multi-Queue Consumers](#consumer-class)**: Offering very flexible models which make RedisSMQ an ideal message broker for your microservices.
|
|
24
24
|
* **[Supporting both at-least-once/at-most-once delivery](/docs/api/message.md#messageprototypesetretrythreshold)**: In case of failures, while delivering or processing a message, RedisSMQ can guaranty that the message will be not lost and redelivered again. When configured to do so, RedisSMQ can also ensure that the message is delivered at-most-once.
|
|
25
|
-
* **[Message Expiration](docs/api/message.md#messageprototypesetttl)**: A message will not be delivered if it has been in a queue for longer than a given amount of time, called TTL (time-to-live).
|
|
26
|
-
* **[Message Consumption Timeout](docs/api/message.md#messageprototypesetconsumetimeout)**: Timeout for consuming messages.
|
|
27
|
-
* **[Queue Rate Limiting](docs/queue-rate-limiting.md)**: Allowing you to control the rate at which the messages are consumed from a given queue.
|
|
28
|
-
* **[Scheduling Messages](docs/scheduling-messages.md)**: Messages can be configured to be delayed, delivered for N times with an optional period between deliveries, and to be scheduled using CRON expressions.
|
|
29
|
-
* **[Reliable Priority Queues](docs/priority-queues.md)**: Supports priority messaging.
|
|
30
|
-
* **[Multiplexing](docs/multiplexing.md)**: A feature which allows message handlers to use a single redis connection to dequeue and consume messages.
|
|
25
|
+
* **[Message Expiration](/docs/api/message.md#messageprototypesetttl)**: A message will not be delivered if it has been in a queue for longer than a given amount of time, called TTL (time-to-live).
|
|
26
|
+
* **[Message Consumption Timeout](/docs/api/message.md#messageprototypesetconsumetimeout)**: Timeout for consuming messages.
|
|
27
|
+
* **[Queue Rate Limiting](/docs/queue-rate-limiting.md)**: Allowing you to control the rate at which the messages are consumed from a given queue.
|
|
28
|
+
* **[Scheduling Messages](/docs/scheduling-messages.md)**: Messages can be configured to be delayed, delivered for N times with an optional period between deliveries, and to be scheduled using CRON expressions.
|
|
29
|
+
* **[Reliable Priority Queues](/docs/priority-queues.md)**: Supports priority messaging.
|
|
30
|
+
* **[Multiplexing](/docs/multiplexing.md)**: A feature which allows message handlers to use a single redis connection to dequeue and consume messages.
|
|
31
31
|
* **[HTTP API](https://github.com/weyoss/redis-smq-monitor)**: an HTTP interface is provided to interact with the MQ.
|
|
32
32
|
* **[Web UI](https://github.com/weyoss/redis-smq-monitor-client)**: RedisSMQ can be managed also from your web browser.
|
|
33
33
|
* **[Logging](https://github.com/weyoss/redis-smq-common/blob/master/docs/logs.md)**: Comes with a built-in JSON logger. But you can also use your own logger instance.
|
|
34
|
-
* **[Configurable](docs/configuration.md)**: Many options and features can be configured.
|
|
34
|
+
* **[Configurable](/docs/configuration.md)**: Many options and features can be configured.
|
|
35
35
|
* **Both redis & ioredis clients are supported**: RedisSMQ can be configured to use either `redis` or `ioredis` to connect to Redis server.
|
|
36
36
|
* **Rigorously tested**: With 100+ tests and code coverage no less than 80%.
|
|
37
37
|
* **Highly optimized**: Strongly-typed and implemented using pure callbacks, with small memory footprint and no memory leaks. See [callbacks vs promises vs async/await benchmarks](http://bluebirdjs.com/docs/benchmarks.html).
|
|
@@ -41,7 +41,7 @@ RedisSMQ is a Node.js library for queuing messages (aka jobs) and processing the
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-

|
|
44
|
+

|
|
45
45
|
|
|
46
46
|
## Table of Content
|
|
47
47
|
|
|
@@ -54,16 +54,16 @@ RedisSMQ is a Node.js library for queuing messages (aka jobs) and processing the
|
|
|
54
54
|
2. [Producer Class](#producer-class)
|
|
55
55
|
3. [Consumer Class](#consumer-class)
|
|
56
56
|
2. Advanced Topics
|
|
57
|
-
1. [Scheduling Messages](docs/scheduling-messages.md)
|
|
58
|
-
2. [Priority Queues](docs/priority-queues.md)
|
|
59
|
-
3. [Queue Rate Limiting](docs/queue-rate-limiting.md)
|
|
60
|
-
4. [Multiplexing](docs/multiplexing.md)
|
|
61
|
-
5. [Message Manager](docs/api/message-manager.md)
|
|
62
|
-
6. [Queue Manager](docs/api/queue-manager.md)
|
|
57
|
+
1. [Scheduling Messages](/docs/scheduling-messages.md)
|
|
58
|
+
2. [Priority Queues](/docs/priority-queues.md)
|
|
59
|
+
3. [Queue Rate Limiting](/docs/queue-rate-limiting.md)
|
|
60
|
+
4. [Multiplexing](/docs/multiplexing.md)
|
|
61
|
+
5. [Message Manager](/docs/api/message-manager.md)
|
|
62
|
+
6. [Queue Manager](/docs/api/queue-manager.md)
|
|
63
63
|
7. [HTTP API](https://github.com/weyoss/redis-smq-monitor)
|
|
64
64
|
8. [Web UI](https://github.com/weyoss/redis-smq-monitor-client)
|
|
65
65
|
9. [Logs](https://github.com/weyoss/redis-smq-common/blob/master/docs/logs.md)
|
|
66
|
-
5. [RedisSMQ Architecture](docs/redis-smq-architecture.md)
|
|
66
|
+
5. [RedisSMQ Architecture](/docs/redis-smq-architecture.md)
|
|
67
67
|
6. [Performance](#performance)
|
|
68
68
|
7. [Contributing](#contributing)
|
|
69
69
|
8. [License](#license)
|
|
@@ -88,7 +88,7 @@ Considerations:
|
|
|
88
88
|
|
|
89
89
|
## Configuration
|
|
90
90
|
|
|
91
|
-
See [Configuration](docs/configuration.md) for more details.
|
|
91
|
+
See [Configuration](/docs/configuration.md) for more details.
|
|
92
92
|
|
|
93
93
|
## Usage
|
|
94
94
|
|
|
@@ -129,7 +129,7 @@ message
|
|
|
129
129
|
|
|
130
130
|
The `Message` class provides many methods for setting up different message parameters such as message body, message priority, message TTL, etc.
|
|
131
131
|
|
|
132
|
-
See [Message Reference](docs/api/message.md) for more details.
|
|
132
|
+
See [Message Reference](/docs/api/message.md) for more details.
|
|
133
133
|
|
|
134
134
|
#### Producer Class
|
|
135
135
|
|
|
@@ -162,7 +162,7 @@ producer.produce(message, (err) => {
|
|
|
162
162
|
});
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
See [Producer Reference](docs/api/producer.md) for more details.
|
|
165
|
+
See [Producer Reference](/docs/api/producer.md) for more details.
|
|
166
166
|
|
|
167
167
|
#### Consumer Class
|
|
168
168
|
|
|
@@ -214,21 +214,21 @@ A `dead-letter queue` is a system generated queue that holds all messages that c
|
|
|
214
214
|
|
|
215
215
|
By default, RedisSMQ does not store acknowledged and dead-lettered messages for saving disk and memory space, and also to increase message processing performance. If you need such feature, you can enable it from your [configuration](/docs/configuration.md) object.
|
|
216
216
|
|
|
217
|
-
See [Consumer Reference](docs/api/consumer.md) for more details.
|
|
217
|
+
See [Consumer Reference](/docs/api/consumer.md) for more details.
|
|
218
218
|
|
|
219
219
|
### Advanced Topics
|
|
220
220
|
|
|
221
|
-
* [Scheduling Messages](docs/scheduling-messages.md)
|
|
221
|
+
* [Scheduling Messages](/docs/scheduling-messages.md)
|
|
222
222
|
|
|
223
|
-
* [Priority Queues](docs/priority-queues.md)
|
|
223
|
+
* [Priority Queues](/docs/priority-queues.md)
|
|
224
224
|
|
|
225
|
-
* [Queue Rate Limiting](docs/queue-rate-limiting.md)
|
|
225
|
+
* [Queue Rate Limiting](/docs/queue-rate-limiting.md)
|
|
226
226
|
|
|
227
|
-
* [Multiplexing](docs/multiplexing.md)
|
|
227
|
+
* [Multiplexing](/docs/multiplexing.md)
|
|
228
228
|
|
|
229
|
-
* [Message Manager](docs/api/message-manager.md)
|
|
229
|
+
* [Message Manager](/docs/api/message-manager.md)
|
|
230
230
|
|
|
231
|
-
* [Queue Manager](docs/api/queue-manager.md)
|
|
231
|
+
* [Queue Manager](/docs/api/queue-manager.md)
|
|
232
232
|
|
|
233
233
|
* [HTTP API](https://github.com/weyoss/redis-smq-monitor)
|
|
234
234
|
|
|
@@ -238,11 +238,11 @@ See [Consumer Reference](docs/api/consumer.md) for more details.
|
|
|
238
238
|
|
|
239
239
|
## RedisSMQ Architecture
|
|
240
240
|
|
|
241
|
-
* See [Architecture Overview](docs/redis-smq-architecture.md).
|
|
241
|
+
* See [Architecture Overview](/docs/redis-smq-architecture.md).
|
|
242
242
|
|
|
243
243
|
## Performance
|
|
244
244
|
|
|
245
|
-
See [Performance](docs/performance.md) for more details.
|
|
245
|
+
See [Performance](/docs/performance.md) for more details.
|
|
246
246
|
|
|
247
247
|
## Contributing
|
|
248
248
|
|
|
@@ -14,8 +14,8 @@ export declare class DequeueMessage {
|
|
|
14
14
|
protected priorityQueuing: boolean;
|
|
15
15
|
constructor(messageHandler: MessageHandler, redisClient: RedisClient);
|
|
16
16
|
protected dequeueMessageWithPriority(cb: ICallback<string>): void;
|
|
17
|
-
protected waitForMessage(cb: ICallback<string>): void;
|
|
18
|
-
protected dequeueMessage(cb: ICallback<string>): void;
|
|
17
|
+
protected waitForMessage(cb: ICallback<string | null>): void;
|
|
18
|
+
protected dequeueMessage(cb: ICallback<string | null>): void;
|
|
19
19
|
dequeue(): void;
|
|
20
20
|
run(cb: ICallback<void>): void;
|
|
21
21
|
quit(cb: ICallback<void>): void;
|
|
@@ -8,7 +8,7 @@ export declare class QueueRateLimit {
|
|
|
8
8
|
constructor(config: IRequiredConfig, redisClient: RedisClient, logger: ICompatibleLogger);
|
|
9
9
|
clear(queue: string | TQueueParams, cb: ICallback<void>): void;
|
|
10
10
|
set(queue: string | TQueueParams, rateLimit: TQueueRateLimit, cb: ICallback<void>): void;
|
|
11
|
-
get(queue: string | TQueueParams, cb: ICallback<TQueueRateLimit>): void;
|
|
11
|
+
get(queue: string | TQueueParams, cb: ICallback<TQueueRateLimit | null>): void;
|
|
12
12
|
static hasExceeded(redisClient: RedisClient, queue: TQueueParams, rateLimit: TQueueRateLimit, cb: ICallback<boolean>): void;
|
|
13
|
-
static get(config: IRequiredConfig, redisClient: RedisClient, queue: string | TQueueParams, cb: ICallback<TQueueRateLimit>): void;
|
|
13
|
+
static get(config: IRequiredConfig, redisClient: RedisClient, queue: string | TQueueParams, cb: ICallback<TQueueRateLimit | null>): void;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redis-smq",
|
|
3
|
-
"version": "7.0.0-rc.
|
|
3
|
+
"version": "7.0.0-rc.5",
|
|
4
4
|
"description": "A simple high-performance Redis message queue for Node.js.",
|
|
5
5
|
"author": "Weyoss <weyoss@protonmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"bluebird": "3.7.2",
|
|
37
37
|
"cron-parser": "3.5.0",
|
|
38
38
|
"lodash": "4.17.21",
|
|
39
|
-
"redis-smq-common": "1.0.0-rc.
|
|
39
|
+
"redis-smq-common": "1.0.0-rc.10",
|
|
40
40
|
"uuid": "8.3.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|