Slow producer in ActiveMQ failover mode

Problem Description

A cJMS is configured as follows:



If the primary broker is in an active state (master) and the secondary broker is in a standby state (slave), then the producer produces at a faster rate.


If the secondary broker becomes the master (during failover switch), or if you change the order of the brokers (primary is still the master) then the producer produces at a slower rate, as shown below:



Root Cause

The slowness is due to the default timeout waste.



Perform one of the following options to resolve the issue:


  • Set a smaller connectionTimeout=50 to every node in the URI, for example:



  • Select the Use PooledConnectionFactory option on the cMQConnectionFactory component.

Version history
Revision #:
5 of 5
Last update:
‎07-05-2019 03:47 AM
Updated by: