@acmekit/event-bus-redis
v2.13.94
Published
Redis Event Bus Module for AcmeKit
Downloads
4,169
Readme
Overview
Redis Event Bus module for AcmeKit. When installed, the events system of AcmeKit is powered by BullMQ and io-redis. BullMQ is responsible for the message queue and worker. io-redis is the underlying Redis client, that BullMQ connects to for events storage.
Getting started
Install the module:
yarn add @acmekit/event-bus-redisAdd the module to your acmekit-config.js:
module.exports = {
// ...
modules: [
{
resolve: "@acmekit/event-bus-redis",
options: {
redisUrl: "redis:..",
},
},
],
// ...
}Configuration
The module can be configured with the following options:
| Option | Type | Description | Default |
| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------ | --------------- |
| redisUrl | string | URL of the Redis instance to connect to. | events-worker |
| queueName | string? | Name of the BullMQ queue. | events-queue |
| queueOptions | object? | Options for the BullMQ queue. See BullMQ's documentation. | {} |
| redisOptions | object? | Options for the Redis instance. See io-redis's documentation | {} |
Info: See how the options are applied in the RedisEventBusService and loader.
If you do not provide a redisUrl in the module options, the server will fail to start.
