qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: JMS client reconnect to qpidc
Date Tue, 20 Aug 2013 17:52:14 GMT
On 08/20/2013 05:58 PM, Aleš Trček wrote:
> Hi all,
> I tested a situation where I have JMS consumers (and producers for that matter) attached
to some queues on qpidc-0.22 broker and then I stop the broker and start it again (with persistence
module). The connection is not reestablished, and subsequent calls to MessageConsumer.receive()
all throw IllegalStateException. When I tried to do connetion.start() (in the catch block),
I also get IllegalStateException (in debug I can see that the connection is closed). qpid-stat
-u shows no connections.
> I would like to be able to (automatically) reconnect in such case, and continue to use
the same MessageConsumer object(s) if possible. Are there any special options I have to use
(on broker or client side) or how should I handle such situation?
> I am using AMQP-0.10 and java client libs 0.25.

You can configure the client to try to reconnect using the connection 
"url" options:


The third example in section 3.4 would be closest to what you want to 
do. You could edit the retries and take out the second broker from the 
broker list. (And possibly change from roundrobin to singlebroker for 
the failover option?)

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message