You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by oseymen <oz...@tdpg.com> on 2011/09/19 12:34:17 UTC

Transactional Producer - Messages after exception during commit

Hi all,

In the scenario where a producer sends n messages in a transacted session
and an exception is thrown during commit (due to network issues for
example), what happens to those n messages sent (but not commited)?

Would they still live in memory in the broker? 

Thanks,
Ozan

--
View this message in context: http://activemq.2283324.n4.nabble.com/Transactional-Producer-Messages-after-exception-during-commit-tp3823557p3823557.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Transactional Producer - Messages after exception during commit

Posted by Gary Tully <ga...@gmail.com>.
It depends on whether the broker got the commit message or not. If it
did not, then the transaction rolls back on the broker when it sees
the the disconnect.

If you are using failover, the client will report an exception. It
sees a missing reply but can't know the outcome so it must alert the
client.
If the commit was not sent at the time of failover, the reconnect will
recreate the context and resend the messages, a subsequent commit will
work as expected.

On 19 September 2011 11:34, oseymen <oz...@tdpg.com> wrote:
> Hi all,
>
> In the scenario where a producer sends n messages in a transacted session
> and an exception is thrown during commit (due to network issues for
> example), what happens to those n messages sent (but not commited)?
>
> Would they still live in memory in the broker?
>
> Thanks,
> Ozan
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Transactional-Producer-Messages-after-exception-during-commit-tp3823557p3823557.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



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