@mashroom/mashroom-messaging-external-provider-redis
v2.7.1
Published
Mashroom plugin that can use a Redis server as external messaging provider for service side messaging
Downloads
7
Readme
Mashroom Messaging External Provider Redis
Plugin for Mashroom Server, a Microfrontend Integration Platform.
This plugin allows to use a Redis server as external messaging provider for server side messaging. This enables cluster support for server side messaging and also allows communication with 3rd party systems.
Usage
If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-messaging-external-provider-redis as dependency.
To activate this provider configure the Mashroom Messaging plugin like this:
{
"plugins": {
"Mashroom Messaging Services": {
"externalProvider": "Mashroom Messaging External Provider Redis"
}
}
}
And configure this plugin like this in the Mashroom config file:
{
"plugins": {
"Mashroom Messaging External Provider Redjs": {
"internalTopic": "mashroom",
"client": {
"redisOptions": {
"host": "localhost",
"port": "6379",
"maxRetriesPerRequest": 3,
"enableOfflineQueue": false
},
"cluster": false,
"clusterNodes": null,
"clusterOptions": null
}
}
}
}
- internalTopic: The base topic the server should use for internal messages. E.g. if the value is mashroom/test all messages published internally are prefixed with mashroom/test before published to MQTT and at the same time this provider listens to mashroom/test/# for messages (Default: mashroom)
- client: Options for the Redis client. redisOptions are just to the Redis constructor of [ioredis](https://github.com/luin/ioredis Checkout out the ioredis documentation for all available options.