You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chenxiong Qi <qc...@gmail.com> on 2017/09/27 07:04:13 UTC

When need to call Acking.release

Hi,

I would like to accept a received message manually by calling
self.accept inside on_message callback. When I'm reading the document,
there is also Acking.release for releasing received message so that it
can be handled by other receivers.

I'm not quite sure if a received message is not accepted, is it
necessary to call self.release inside on_message? In what conditions
it has to be called?

The document mentions "making it available at the source", what does
it mean by "source", can you explain it more specifically?

I'm using python-qpid-proton to send and receive message to and from
ActiveMQ brokers.

Thank you very much.

-- 
Regards,
Chenxiong Qi

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


Re: When need to call Acking.release

Posted by Gordon Sim <gs...@redhat.com>.
On 27/09/17 08:04, Chenxiong Qi wrote:
> Hi,
> 
> I would like to accept a received message manually by calling
> self.accept inside on_message callback. When I'm reading the document,
> there is also Acking.release for releasing received message so that it
> can be handled by other receivers.
> 
> I'm not quite sure if a received message is not accepted, is it
> necessary to call self.release inside on_message? In what conditions
> it has to be called?

It depends if auto_accept on the proton.handlers.IncomingMessageHandler 
instance is set. If it is, then the message will be accepted when 
on_message returns unless that call raises proton.handlers.Reject or 
proton.handlers.Release.

> The document mentions "making it available at the source", what does
> it mean by "source", can you explain it more specifically?

It means that the broker will be able to deliver that message to a 
consumer again (possibly the same one, possibly a different one).

> I'm using python-qpid-proton to send and receive message to and from
> ActiveMQ brokers.
> 
> Thank you very much.
> 


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