My answers enclosed ________________________________________ From: Gordon Sim [[email protected]] Sent: Tuesday, August 21, 2012 11:52 AM To: [email protected] Subject: Re: Can someone help to understand
On 08/21/2012 04:21 PM, Nitin Shah wrote: > I did not specify a parameter to the sync call, which means it is > default i.e. true. That means it blocks when called. If that is the > case, why does it repeat the messages since I assume they have been > acked since we forced a sync and waited a while before killing the > broker. Did you kill the broker during a sync() or in between syncs? How manay messages did it replay? Nitin:: the broker was killed a long time after the sync call was done, minutes > Also in our scenario, the broker ends up starting on another > VM in our test setup. > > On the receiver side, we acknowledge every message received. It is > the unsettled count that seems to be the issue. Right, unsettled == in doubt. > If that count on the > sender is 0, no messages are repeated. I can only get that if the > link options on the sender are set to "unreliable". After a Session::sync() that should also be 0 (assuming no other thread is using the session). Nitin:: I should check that count, i suspect it may not be zero. > No other setup > produces the result we want. Explicitly sinking the session does not > seem to stop the repeated messages on a failover of the broker unless > we have the link option as stated above. As mentioned you can choose between message loss or message duplication at present. If you choose duplication you can't eliminate it. There is no exactly once guarantee supported yet. Nitin:: I understand that from the documentation, so i have not assumed anything else. Nitin:: one more thing I should add, the producer and the consumer are different thread on the same process, could that cause a problem? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
