« Return to Thread: Ask for clarification of ACK

Re: Ask for clarification of ACK

by Jeff Xiong :: Rate this Message:

Reply to Author | View in Thread

Well...since I'm not an expert of messaging, I guess it's forgivable
to ask naive questions...

Let's imagine that:

Client1 SUBSCRIBEs destA
Client2 SUBSCRIBEs destA
Client3 SENDs message to destA
Broker sends MESSAGE to Client1
(Client2 goes down without DISCONNECT or UNSUBSCRIBE)
Broker sends MESSAGE to Client2 and fails

Should the broker store and resend message in this case? If not, then
from Client2's perspective, the behavior of the broker changes when
there is or is not another subscriber, which is weird to me.

On Dec 14, 2007 9:59 PM, andrewk <andrew@...> wrote:

>
>
> 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
>
> --
> View this message in context: http://www.nabble.com/Ask-for-clarification-of-ACK-tp14329341p14336210.html
> Sent from the stomp - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>



--
Jeff Xiong
Software Journeyman - http://gigix.thoughtworkers.org
Open Source Contributor - http://stomperl.googlecode.com/
Technical Evangelist - http://www.infoq.com/cn/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: Ask for clarification of ACK