0
votes

I have a queue with one producer and two consumers using CLIENT_ACKNOWLEDGE. The two consumers share the connections, but they live in different threads so each uses its own session.

What happens if consumer A does not acknowledge the last message received? In which scenario the message will be re-delivered and consumed by consumer B? Is it when the session consumer A is using is closed? Do I need some configuration on JMS provider to dictate what happens in such a scenario?

1

1 Answers

0
votes

I don't think this situation is directly addressed in the JMS specification so the answer will ultimately depend on what JMS broker you're using. However, having worked on multiple JMS brokers in the past I would say that generally speaking any message that has been dispatched by the broker to a consumer but which hasn't yet been acknowledged by that consumer will be cancelled back to the broker and will be made available for redelivery once the consumer in question is closed.