You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Zhemzhitsky Sergey <Se...@troika.ru> on 2012/08/24 10:35:51 UTC

Forcibly close a receiver?

Hi guys,

Is it possible to forcibly close a receiver that is currently waits for incoming message with Duration::FOREVER?
I.e. Receiver.get(message, Duration::FOREVER)

Call to Receiver.close() from another thread seems does not cancels the receiving in that case.

Best Regards,
Sergey

_______________________________________________________

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. 
If you need assistance please contact our Contact Center  (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp  


RE: Forcibly close a receiver?

Posted by Zhemzhitsky Sergey <Se...@troika.ru>.
Hi Gordon,

Thanks a lot for suggestions.

I've raised the following JIRA issue: https://issues.apache.org/jira/browse/QPID-4265)

Best Regards,
Sergey 


-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Wednesday, August 29, 2012 11:47 AM
To: users@qpid.apache.org
Subject: Re: Forcibly close a receiver?

On 08/24/2012 09:35 AM, Zhemzhitsky Sergey wrote:
> Is it possible to forcibly close a receiver that is currently waits for incoming message with Duration::FOREVER?
> I.e. Receiver.get(message, Duration::FOREVER)

Sadly, it appears not, short of closing the underlying session. The receiver is blocked on a session level incoming message queue and at present there is no way to signal to a specific receiver blocked on that structure that it has been closed.

The other workaround is to use a smaller duration and poll a little bit. 
This shouldn't require any more network traffic, it would just wake the thread up every so often and recheck the state of the receiver.

> Call to Receiver.close() from another thread seems does not cancels the receiving in that case.

That seems to be a design flaw (as described above). If you want to raise a JIRA and assign to me I'll see if I can find a way to fix that and will certainly make sure that case works for the new AMQP 1.0 implementation.


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


_______________________________________________________

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. 
If you need assistance please contact our Contact Center  (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp  


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


Re: Forcibly close a receiver?

Posted by Gordon Sim <gs...@redhat.com>.
On 08/24/2012 09:35 AM, Zhemzhitsky Sergey wrote:
> Is it possible to forcibly close a receiver that is currently waits for incoming message with Duration::FOREVER?
> I.e. Receiver.get(message, Duration::FOREVER)

Sadly, it appears not, short of closing the underlying session. The 
receiver is blocked on a session level incoming message queue and at 
present there is no way to signal to a specific receiver blocked on that 
structure that it has been closed.

The other workaround is to use a smaller duration and poll a little bit. 
This shouldn't require any more network traffic, it would just wake the 
thread up every so often and recheck the state of the receiver.

> Call to Receiver.close() from another thread seems does not cancels the receiving in that case.

That seems to be a design flaw (as described above). If you want to 
raise a JIRA and assign to me I'll see if I can find a way to fix that 
and will certainly make sure that case works for the new AMQP 1.0 
implementation.


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