You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SuoNayi <su...@163.com> on 2011/09/07 18:40:47 UTC

How does message acknowledge reply to broker when session is transacted?

Hi all,how does message acknowledge reply to broker when session is transacted?

I have read the source code but found nothing to do if session is transacted after messages are consumed.

Thanks.

Reply:Reply:Re: How does message acknowledge reply to broker when session is transacted?

Posted by SuoNayi <su...@163.com>.
I'm sorry I ignore  NOT operator before method named isAutoAcknowledgeBatch.
This make me confused for one day just because I'm so careless  to ignore the important operator NOT.
Thanks Gary.

At 2011-09-08 09:21:04,SuoNayi <su...@163.com> wrote:
>Gary,thanks for your quick reply.I have read source code again,session will dispatch message to consumer with the method dispatch(Line1216).
>beforeMessageIsConsumed will be invoked before messages are consumed and afterMessageIsConsumed will be invoked after messages are consumed.
>But no ackLater is not involved because session is transacted and acknowledgementMode is auto.
>
>At 2011-09-08 01:14:54,"Gary Tully" <ga...@gmail.com> wrote:
>>there is a synchronization registered with the transaction and the ack
>>is sent in a beforeEnd callback when the transaction commits.
>>see: org.apache.activemq.ActiveMQMessageConsumer#ackLater
>>
>>2011/9/7 SuoNayi <su...@163.com>:
>>> Hi all,how does message acknowledge reply to broker when session is transacted?
>>>
>>> I have read the source code but found nothing to do if session is transacted after messages are consumed.
>>>
>>> Thanks.
>>
>>
>>
>>-- 
>>http://fusesource.com
>>http://blog.garytully.com

Reply:Re: How does message acknowledge reply to broker when session is transacted?

Posted by SuoNayi <su...@163.com>.
Gary,thanks for your quick reply.I have read source code again,session will dispatch message to consumer with the method dispatch(Line1216).
beforeMessageIsConsumed will be invoked before messages are consumed and afterMessageIsConsumed will be invoked after messages are consumed.
But no ackLater is not involved because session is transacted and acknowledgementMode is auto.

At 2011-09-08 01:14:54,"Gary Tully" <ga...@gmail.com> wrote:
>there is a synchronization registered with the transaction and the ack
>is sent in a beforeEnd callback when the transaction commits.
>see: org.apache.activemq.ActiveMQMessageConsumer#ackLater
>
>2011/9/7 SuoNayi <su...@163.com>:
>> Hi all,how does message acknowledge reply to broker when session is transacted?
>>
>> I have read the source code but found nothing to do if session is transacted after messages are consumed.
>>
>> Thanks.
>
>
>
>-- 
>http://fusesource.com
>http://blog.garytully.com

Re: How does message acknowledge reply to broker when session is transacted?

Posted by Gary Tully <ga...@gmail.com>.
there is a synchronization registered with the transaction and the ack
is sent in a beforeEnd callback when the transaction commits.
see: org.apache.activemq.ActiveMQMessageConsumer#ackLater

2011/9/7 SuoNayi <su...@163.com>:
> Hi all,how does message acknowledge reply to broker when session is transacted?
>
> I have read the source code but found nothing to do if session is transacted after messages are consumed.
>
> Thanks.



-- 
http://fusesource.com
http://blog.garytully.com