Nitin,

One thing to keep in mind is that there are actually two separate
transfers involved in moving a message from sender to receiver.  You
mentioned the sender's capacity is 10, which is interesting since it is
very close to the number of re-sends you are seeing.

The transfer from sender to broker-queue is one acknowledged transfer
and the transfer from the queue to the receiver is the other.  The
session.acknowledge() is only concerned with the second transfer (queue
to receiver).

It is likely that the re-sends are coming from the sender and not the
queue (i.e. 10 duplicate messages are re-sent and re-queued).  If this
is the case, the way you use session.acknowledge() will have no effect
on the behavior.

Generally, you will see re-sent messages when connections or brokers are
shut down and restarted.  This is because there are a number of in-doubt
deliveries after the connection loss.  The number of in-doubt deliveries
is capped by the capacity of both the sender and receiver.  Note also
that the messages that are re-sent are annotated as such with the
redelivered header flag.

In your case, you can have up to 10 in-doubt deliveries from the sender
and one in-doubt from the queue (since you acknowledge every message).

-Ted


On 10/27/2014 03:57 PM, Nitin Shah wrote:
> Hi,
> 
> We are running  C++ QPID broker and clients on version 0.26 . running on 
> WindRiver Linux.
> We acknowledge the session received messages on the client using  
> session.acknowledge() interface on every received message. However, when the 
> broker is restarted ( after it being stopped ), we get the last 11 messages 
> repeated to the client. The senders capacity is set to 10.
> 
> We would like to understand how the acknowledge works. It does not seem to 
> matter if we use the other forms of acknowledges i.e.
> session.acknowledge(message &) or session.acknowledgeUpTo(message &). The 
> behavior is the same although the documentation seems to indicate that once 
> acked to the broker, the messages should not be repeated.
> 
> Can I ask for some feedback and clarify this.
> 
> Thanks
> 
> Nitin Shah
> 

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

Reply via email to