Broadcast
The Broadcast service is responsible for relaying messages to members of the application server cluster. It provides
an essential publish and subscription service so that application server members can broadcast messages, receive messages
and subscribe to topics and events that occur throughout the system.
Essential Configuration
{
"broadcast": {
"enabled": <boolean>,
"type": "<type>",
"config": {
...configuration
}
}
}
There are two types of broadcast providers:
local
- works for thesingle
mode within a single machineredis
- uses Redis to broadcast messages across acluster
For more information about setup modes, please see Application Server Clustering.
Local Provider
No configuration is required for this provider.
Example:
{
"setup": "single",
"broadcast": {
"enabled": true,
"type": "local"
}
}
Redis Provider
{
"setup": "cluster",
"broadcast": {
"enabled": true,
"type": "redis",
"config": {
"url": "<Redis connection URL>"
}
}
}
Environment Variables
You can also configure the Broadcast Service using the following environment variables:
CLOUDCMS_BROADCAST_TYPE
- eitherlocal
orredis
You can configure the Broadcast Redis Provider using the following settings:
CLOUDCMS_BROADCAST_REDIS_DEBUG_LEVEL
- eitherinfo
,warn
,error
ordebug
CLOUDCMS_BROADCAST_REDIS_URL
- the Redis connection URL
Further, the Broadcast Redis Provider will automatically draw from the following global Redis environment variables
if you've set them:
CLOUDCMS_REDIS_DEBUG_LEVEL
- eitherinfo
,warn
,error
ordebug
CLOUDCMS_REDIS_URL
- the Redis connection URL