Hi Gordon,

Thanks for your responses to both my questions. The receive side i.e. that does 
the getNextReceiver() call and then fetches the message does a session 
acknowledge as soon as the fetch returns.  

The strange thing about my setup is that the sender is one thread on a process 
( linux) and the receiver is another thread on the same process, so the data 
path is Process A to Broker via the Qpid Library ( I assume ) and then back to 
Process A. In my testing, the sends are done for 20 packets and then stop and 
no more sends are done. I see that the receiver has received them and displayed 
the content for my validation. Then I go in and kill the broker and in our 
system a backup broker is started automatically. All users reconnect 
automatically and the last 5 messages are received by the receiver in Process A 
again. It does not matter how long I wait after the sends are complete, may be 
minutes and it still repeats the messages.


I have not tried the senders and receivers on different processes. I will and I 
suspect that may work.

Hope this helps

Nitin



-----Original Message-----
From: Gordon Sim [mailto:g...@redhat.com] 
Sent: Thursday, October 11, 2012 3:02 AM
To: dev@qpid.apache.org
Subject: Re: Broker repeating messages

On 10/08/2012 09:10 PM, Nitin Shah wrote:
> We are running Qpid C++ broker(s) release version 0.18 . I find it 
> strange when the clients reconnect to a broker that has been killed 
> and restarted, messages get repeated. In my case we set up the 
> connection with the option = "reconnect:true". We also acknowledge the 
> received messages as soon as they are received. In my test case, the 
> messages are received a long time before the broker is killed and 
> restarted. However, the last 5 messages are re-received whatever I do. 
> The receiver Capacity is set to 10.
>
> Can we avoid this situation. We wish not to get the repeated messages 
> since we have already acknowledged them. Is this a BUG?

Once an acknowledgement has been processed by the broker it should not 
redeliver those messages. On linux there is a known issue at present relating 
to the asynchronous write of the dequeue record to the journal. 
The 0-10 session-completed for message-accept is sent without waiting for that 
asynchronous write to complete. This can mean that recently acknowledged 
messages are not marked as dequeued in the broker when it is shutdown, and 
those messages would be redelivered when restarted.

However, it does seem strange that it is a 'long time' before the broker is 
killed that the acknowledgements were sent. Can you quantify what you mean 
there?

One other thing to check is to make sure that it is not in fact the sender that 
is replaying the messages (rather than the broker).


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to