You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Zhihua Che <zh...@gmail.com> on 2012/05/09 09:19:27 UTC

Is it reasonable to clear the messages in one given queue which haven't been received by any receiver?

Hi,

    I wonder if it's ok to clear one specific queue to ensure the
queue is clean before one sender or receiver use it? I didn't find any
method available in Sender or Receiver. So do you think this is a
reasonable user case?

Harvey
Thanks

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


Re: Is it reasonable to clear the messages in one given queue which haven't been received by any receiver?

Posted by Zhihua Che <zh...@gmail.com>.
2012/5/9 Chuck Rolke <cr...@redhat.com>:
> Clearing a queue could be done by your receiver: just open a connection/session/receiver and receive everything until you recognize that you are in sync with your sender.
>
> Or you could open a temporary queue created by the receiver that is guaranteed to be empty every time the receiver starts. Then the sender only sends if the queue exists and the sender thereby knows that a receiver is in place.
>
> There is a management method for queues called 'purge' that gives you a back door way to clear messages. Avoid using this method for your day-to-day message traffic.

Thanks for your  info.

But I guess I can't find any docs about these APIs... By the way, is
this page http://qpid.apache.org/apis/0.14/cpp/html/index.html a
complete and accurate API reference?
Are there any APIs for creating or deleting or controlling or
configuring queues at runtime?

>
> -C
>
> ----- Original Message -----
>> From: "Zhihua Che" <zh...@gmail.com>
>> To: "users" <us...@qpid.apache.org>
>> Sent: Wednesday, May 9, 2012 3:19:27 AM
>> Subject: Is it reasonable to clear the messages in one given queue which haven't been received by any receiver?
>>
>> Hi,
>>
>>     I wonder if it's ok to clear one specific queue to ensure the
>> queue is clean before one sender or receiver use it? I didn't find
>> any
>> method available in Sender or Receiver. So do you think this is a
>> reasonable user case?
>>
>> Harvey
>> Thanks
>>
>> ---------------------------------------------------------------------
>> 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
>

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


Re: Is it reasonable to clear the messages in one given queue which haven't been received by any receiver?

Posted by Chuck Rolke <cr...@redhat.com>.
Clearing a queue could be done by your receiver: just open a connection/session/receiver and receive everything until you recognize that you are in sync with your sender.

Or you could open a temporary queue created by the receiver that is guaranteed to be empty every time the receiver starts. Then the sender only sends if the queue exists and the sender thereby knows that a receiver is in place.

There is a management method for queues called 'purge' that gives you a back door way to clear messages. Avoid using this method for your day-to-day message traffic.

-C

----- Original Message -----
> From: "Zhihua Che" <zh...@gmail.com>
> To: "users" <us...@qpid.apache.org>
> Sent: Wednesday, May 9, 2012 3:19:27 AM
> Subject: Is it reasonable to clear the messages in one given queue which haven't been received by any receiver?
> 
> Hi,
> 
>     I wonder if it's ok to clear one specific queue to ensure the
> queue is clean before one sender or receiver use it? I didn't find
> any
> method available in Sender or Receiver. So do you think this is a
> reasonable user case?
> 
> Harvey
> Thanks
> 
> ---------------------------------------------------------------------
> 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