User Tools

Site Tools


Highly Available Replicator Agent Configuration


The Replicator Agent supports an “exclusive consumer” mode that provides a Highly Available (HA) Agent solution while maintaining the order of messages in a queue. This active-passive HA approach will exclusively allow only one Agent to actively read messages from a queue. Other Agents will passively try to connect to the queue and will only be given access to the queue if another Agent is no longer connected.

The Agent uses the queue in the message connection and locks that queue for exclusive use. If multiple tasks are made using the same message connection, only one subscriber task will be created and used. When running a backup Agent, a warning will be logged indicating that the queue is in exclusive use and that consumer wait time will be increased (default is to increase to 30 seconds). Once the first running Agent is stopped or fails, the backup Agent will start consuming messages when the queue becomes available and the consumer wait time will be reset.

HA is only available when the Agent is set to connect to Perspectium's MBS over AMQP/S (HTTP/S is not currently supported)

To set up your HA Agent, add the following configurations to your agent.xml file:

Required Directive Example Use Default Description
message_connection <message_connection user="USER_NAME" password="USER_PASSWORD" queue="QUEUE_NAME" use_basic_consume="true" exclusive="true">URI</message_connection> Message Bus Connection Required Setting the exclusive attribute to true enables HA exclusive consumer mode.
consumer_sleep_time <consumer_sleep_time>"NUMBER OF MILLISECONDS"</consumer_sleep_time> Consumer Sleep Time Optional The consumer_sleep_time tag indicates how many milliseconds a passively connecting Agent should wait before attempting to connect again following a failed connection.

HA Agent Configuration Example

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>



                <decryption_key>The cow jumped over the moon</decryption_key>

                <message_connection queue="psp.out.replicator.ticket_table" password="encrypted:iTOCp4deP7rJNgFkf2AEMA==" user="admin"  use_basic_consume="true" exclusive="true" >amqp://</message_connection>
                <instance_connection user="agent" password="agent123"></instance_connection>


For more information about configuring your Replication Agent, see Agent Configuration.

replicator_agent_highly_available.txt · Last modified: 2018/08/22 15:52 by timothy.pike