2 Replies Latest reply on May 23, 2011 3:06 AM by sergiu_pienar

    Transactional Scenario in HornetQ 2.2.2

    sergiu_pienar

      Hi,

       

      I am interested in knowing if the following scenario is supported in HornetQ 2.2.2 :

       

      1.)A transaction T1 is started and it does some work

      2.)Inside T1 another transaction T2 is started which sends a message

      3.)Transaction T1 fails and it is rolled-back

       

      My question is ... if T1 and T2 are both rolled-back ... does HornetQ support a feature such as pulling the message sent back from the queue ?(The message is ment to reach the queue only iff the transaction is successful otherwise it should be removed from the queue).

       

      Thx.

        • 1. Transactional Scenario in HornetQ 2.2.2
          ataylor

          Firstly, you are talking about nested transactins which is functinality offered by the transaction manager not HornetQ, however, if a consumed message is cancelled due to a tx being rolled back it put back on the queue up to 'maxDeliveryAttempts' before being sent to the dead letter address, any sent messages are just disregarded. This is all in the user manual and tjere is also an example in the distro

          • 2. Transactional Scenario in HornetQ 2.2.2
            sergiu_pienar

            Wrong testing scenario.

             

            My bad, sorry about that and thank you for the given time.

             

            Sergiu.