activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Januszek <>
Subject ActiveMQ failover transport - producers/consumers work on different hosts
Date Mon, 05 Dec 2016 11:26:42 GMT



*Producer puts a message to the queue_1*
create connection
put message
close connection

*Listener (auto_ack) - has a long lived connection since this is a listener*
retrieves the message
puts it in queue_2 (client_ack)

*Thread that runs periodically*
create connection
retrieves everything from queue_2
processes messages
ack messages
close connection

The problem
 Broker_1 goes down. FailoverTransport redirects traffic to broker_2. All
three pieces (Procuder, Listener and Thread) work with broker_2). broker_1
is brought back. Procuder and Thread connect to broker_1. Listener remains
on broker_2. Surprisingly - the onMessage is called when message arives to
queue_1 on broker_1, but listener puts the message to queue_2 on broker_2.

How can I instruct the listener to reconnect to broker_1 once its
operational again? Or should I rather force Producer and Thread work with
broker_2 as long as it's operational?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message