activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniele Dellafiore <>
Subject Reconnect a closed durable subscriber
Date Wed, 30 Jun 2010 12:24:52 GMT
Hi everyone. I just started using ActiveMQ and this is my first
message to the list.
I have searched for answer for my question on the archive without success.

Quick version: I simply can't find a way to reconnect a durable
subscriber after calling MessageConsumer.close() method to disconnect.

Long version:

I am trying to make a durable subscriber work like in this example:

that is: a disconnected durable subscriber receive all messages
dispatched when he was offline at the moment he reconnects.

So I create a producer and a durable subscriber
I send message M1 and is received. Then I call


and send M2 which is not received, correctly.
Then I want to reconnect consumer, send M3 and see that consumer
receives M2 and M3.

But I can't find a method or a way to reconnect the subscriber.
What is the right way?

Thanks for any help.

Daniele Dellafiore

View raw message