Message Broker: ActiveMQ
As an alternative to Apache Kafka, Apache ActiveMQ can also be used as a message broker.
ActiveMQ is significantly easier to install and administer than Kafka, but has several disadvantages as well:
By default, an embedded instance of Apache ActiveMQ is used. This instance is configured with sensible settings, and is suitable for use in a low volume testing installation only. If you are building a server that will handle production workloads (or even important non-production workloads) you should not rely on the embedded ActiveMQ instance and should consider a dedicated Kafka or ActiveMQ instance instead.
Configuration options for the Smile CDR message broker can be found on the Cluster Manager Message Broker page. A sample set of options to configure a remote broker can be seen below.
module.clustermgr.config.messagebroker.type =REMOTE_ACTIVEMQ
module.clustermgr.config.messagebroker.address =tcp://localhost:61616
module.clustermgr.config.messagebroker.username =SOMEUSER
module.clustermgr.config.messagebroker.password =SOMEPASS
You can adjust the memory and storage available to ActiveMQ in the activemq.xml
configuration file. This is important if you have a subscription endpoint that is sometimes unreachable and a large volume of data backs up waiting to be delivered to that endpoint. These are the settings in the activemq.xml
file you can adjust to increase the amount of data that can be held in the queues.
Note that these settings should be carefully considered, and the usage monitored. If ActiveMQ reaches a memory or disk threshold, throughput in your CDR can be stopped entirely as calls to the message broker will be blocked indefinitely.
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage percentOfJvmHeap="70" />
</memoryUsage>
<storeUsage>
<storeUsage limit="400 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="50 gb"/>
</tempUsage>
</systemUsage>
</systemUsage>
The <storeUsage>
setting controls how much space your queues can occupy when they are not being drained.