qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject Re: how qpid can verify whether message delivered to the receiver
Date Tue, 05 Feb 2013 19:37:42 GMT
Hi,
sorry I didn't get back on this.

Given the behaviour that you're suggesting I'm wondering whether you 
care about acks at all? With the C++ qpid::messaging API and JMS it's 
possible to configure an Address String with link: {reliability: 
unreliable} which says that the consumer application doesn't care about 
acking messages.

If this is enabled the client runtime might prefetch some messages which 
will take them off the broker queue but the client application might not 
yet have processed them, in this scenario if the client process dies 
then the messages in the prefetch queue get blatted, but the broker 
isn't maintaining any references to them and won't attempt redelivery.

In this scenario the only messages that remain on the broker are those 
in the actual queue. It "sounds like" this is the behaviour that you are 
after unless I've misunderstood you?

If you actually want to zap everything including the queue you can 
create the queue as exclusive and autodelete, in that case the queue 
will get removed when the connection to it is removed. If you don't set 
it as exclusive but do have autodelete you can have multiple consumer 
connections to the queue and the queue will be removed when the last 
connection is closed. That sounds more than you want, but it may be 
useful to you.

If you *do* still want/need to ack - you say "whenever receiver received 
a special type of message Receiver wants to clear all pending messages 
dedicated to him "  - as I said the other day if you call acknowledge() 
on the most recent message received - in your case perhaps the "special" 
message, then that will also acknowledge all messages previously 
consumed on the Session that message came from - at least that's how JMS 
works and I think qpid::messaging too.

HTH,
Frase


On 04/02/13 06:25, mr_deb wrote:
>   
> HI
> Actually in my application I have one requirement is whenever a client
> exists properly I want to remove all pending message from the broker which
> are waiting for ack. So that next time when clients comes up it should not
> receive the messages.
>
>   Or to elaborate in simplify way whenever receiver received a special type
> of message Receiver wants to clear all pending messages dedicated to him
> from the broker and then it will close connection with broker properly.
>
>
> Hope this time I am clear with my doubts.
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/how-qpid-can-verify-whether-message-delivered-to-the-receiver-tp7587875p7587914.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message