Jeff Xiong wrote:
Then what should the broker do if it sends out the message but can't
get ACK from client? Should it resend? What if the client goes down?
Should the broker store the message in some persistent manner and wait
for another subscriber? Can someone help me to answer the question?
--
Jeff Xiong
I can tell you what the activemq broker seems to do - if you don't ack a message in client ack mode, it waits and never sends another message to that connection. Period. I have not seen a timeout on the broker side, it seems happy to wait.
If the client connection goes down, then activemq will assume the message was not processed by that connection, returns the message to the queue, and a different client connection will be able to get the message. In fact, the only way I have found to un-ack a message (give it back, so to speak) is to sever the connection and reconnect.
As for persistence, activemq is already persisting all messages based on your config, and will only send the message to a different subscriber if it loses connection to the orignal subscriber who has not ack-ed.
I'm basing this on my observation, not a deep look at the code so if an AMQ dev wants to correct me, I'm all ears.
Hope that helps,
-Andrew Kuklewicz