Skip to content

Commit

Permalink
docs(README.md): update features description
Browse files Browse the repository at this point in the history
  • Loading branch information
weyoss committed Nov 22, 2023
1 parent 83ce680 commit 4ac300e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 18 deletions.
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@ RedisSMQ is a Node.js library for queuing messages (aka jobs) and processing the

## Features

* **[High-performance message processing](docs/performance.md)**.
* **[Multi-Queue Producers](docs/producing-messages.md) & [Multi-Queue Consumers](docs/consuming-messages.md)**: Offering flexible Producer/Consumer models, with focus on simplicity and without tons of features. This can make RedisSMQ an ideal message broker for your microservices.
* **[at-least-once/at-most-once Delivery](docs/api/classes/Message.md#setretrythreshold)**: 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.
* **[Different Exchange Types](docs/message-exchanges.md)**: RedisSMQ offers 3 types of exchanges: [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.
* **[FIFO queues, LIFO queues, and Reliable Priority Queues](docs/queues.md)**: Provides different queuing strategies that you may use depending on your needs and requirements.
* **[Message Expiration](docs/api/classes/Message.md#setttl)**: Allowing a message to expire if it has not been delivered within a given amount of time.
* **[Message Consumption Timeout](docs/api/classes/Message.md#setconsumetimeout)**: Allowing to set up a timeout for consuming messages.
* **[Queue Rate Limiting](docs/queue-rate-limiting.md)**: Allowing to control the rate at which the messages are consumed from a given queue.
* **[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.
* **[Multiplexing](/docs/multiplexing.md)**: A feature which allows message handlers to use a single redis connection to dequeue and consume messages.
* **[HTTP API](https://github.com/weyoss/redis-smq-monitor)**: an HTTP interface is provided to interact with the MQ.
* **[Web UI](https://github.com/weyoss/redis-smq-monitor-client)**: RedisSMQ can be managed also from your web browser.
* **[Logging](https://github.com/weyoss/redis-smq-common/blob/master/docs/logs.md)**: RedisSMQ comes with a built-in JSON logger, but can also use your application logger.
* **[Configurable](docs/configuration.md)**: Many options and features can be configured.
* **[Multiple Redis clients](docs/configuration.md)**: Depending on your preferences, RedisSMQ can use either [node-redis v3](https://github.com/redis/node-redis/tree/v3.1.2), [node-redis v4](https://github.com/redis/node-redis), or [ioredis](https://github.com/luin/ioredis).
* **[Highly optimized](https://lgtm.com/projects/g/weyoss/redis-smq/context:javascript)**: Strongly-typed and implemented using pure callbacks, with small memory footprint and no memory leaks. See [Callback vs Promise vs Async/Await benchmarks](https://gist.github.com/weyoss/24f9ecbda175d943a48cb7ec38bde821).
* [High-performance message processing](docs/performance.md).
* 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.
* 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).
* 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.
* 3 queuing strategies that you may use depending on your needs and requirements: [FIFO queues, LIFO queues, and Reliable Priority Queues](docs/queues.md).
* 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.
* [Queue Rate Limiting](docs/queue-rate-limiting.md) which allows to control the rate at which the messages are consumed from a given queue.
* 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.
* [Multiplexing](/docs/multiplexing.md): A feature which allows message handlers to use a single redis connection to dequeue and consume messages.
* An [HTTP interface](https://github.com/weyoss/redis-smq-monitor) is provided to interact with the MQ. RedisSMQ can be managed also from your [web browser](https://github.com/weyoss/redis-smq-monitor-client).
* Depending on [your preferences](docs/configuration.md), RedisSMQ can use either [node-redis v3](https://github.com/redis/node-redis/tree/v3.1.2), [node-redis v4](https://github.com/redis/node-redis), or [ioredis](https://github.com/luin/ioredis).
* RedisSMQ is [highly optimized](https://lgtm.com/projects/g/weyoss/redis-smq/context:javascript), implemented using pure callbacks, with small memory footprint and no memory leaks. See [Callback vs Promise vs Async/Await benchmarks](https://gist.github.com/weyoss/24f9ecbda175d943a48cb7ec38bde821).
* [Both ESM & CJS modules are supported](docs/esm-cjs-modules.md).

## RedisSMQ Use Case: Multi-Queue Producers & Multi-Queue Consumers

Expand Down
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ module.exports = {

#### Message Storage

Published messages, to a queue, are permanently stored unless deleted explicitly.
Published messages, to a queue, are permanently stored unless deleted explicitly.

The `message.store` option allows, additionally, to configure acknowledged/dead-lettered messages storage for all message queues.

In other words, when `message.store` is enabled, a queue, in addition to all published messages, may hold a list of all
In other words, when `message.store` is enabled, a queue, in addition to all published messages, may hold a list of all
dead-lettered messages for example.

By default acknowledged and dead-lettered messages are not stored.
Expand Down
31 changes: 31 additions & 0 deletions docs/esm-cjs-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
> [RedisSMQ](../README.md) / [Docs](README.md) / ESM & CJS Modules
# ESM & CJS Modules

Nowadays, ES modules (ESM) are the official standard packaging format for both backend and frontend JavaScript
applications. Nevertheless, CommonJS modules (CJS) are still very popular and used by many NPM packages.

Official RedisSMQ packages are distributed in both ESM & CJS formats to allow developers to choose the right module
system depending on their applications.

## Using RedisSMQ as an ESM Module

```javascript
import { Queue, EQueueType } from 'redis-smq';

const queue = new Queue();

// Creating a LIFO queue
queue.save('my_queue', EQueueType.LIFO_QUEUE, (err) => console.log(err));
```

## Using RedisSMQ as an CJS Module

```javascript
const { Queue, EQueueType } = require('redis-smq');

const queue = new Queue();

// Creating a LIFO queue
queue.save('my_queue', EQueueType.LIFO_QUEUE, (err) => console.log(err));
```

0 comments on commit 4ac300e

Please sign in to comment.