-
1. Re: Topic-Messages not redelivered after rollback and reconnect.
garytully Mar 11, 2011 6:51 AM (in response to rosenfelder)add a timeout to the call to receive.
message = subscriber.receive(4000);
There is a race between a consumer checking for a message and the broker doing a first async dispatch, often the client wins and does not find a message if there is no wait timeout specified.
-
2. Re: Topic-Messages not redelivered after rollback and reconnect.
rosenfelder Mar 17, 2011 4:19 AM (in response to rosenfelder)The example is simplified for readability. I actually did use some timeout, I even tried with message consumers. There is also no redelivery delay nor exponential backup configured.
When I change the persistence adapter to JDBC, I see the message in the database after sending, but as soon as the persistent subscriber receives the message (in a not-yet commited transaction), it gets removed from the database. So even if I call rollback() afterwards, the message cannot be redelivered again, as it doesn't seem to exist in the message store anymore.
When I switch to message queues, the messages get redelivered, which lets me think that this is a bug in the implementation of topics.
-
3. Re: Topic-Messages not redelivered after rollback and reconnect.
garytully Mar 23, 2011 7:36 AM (in response to rosenfelder)This is a bug. I have raised and resolved AMQ-3238 such that this will be fixed in the ActiveMQ 5.5.
Thanks for the simple test code that demonstrated the problem.
Edited by: gtully on Mar 23, 2011 11:32 AM
Edited by: gtully on Mar 23, 2011 11:35 AM
-
4. Re: Topic-Messages not redelivered after rollback and reconnect.
rosenfelder Mar 31, 2011 10:51 AM (in response to garytully)I was just about to raise a bug in JIRA and now have seen that you already fixed this issue. Thanks a lot for the quick reaction!