Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1926

XA transaction does not roll back, because ActiveMQ exception is reported asynchronously

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      1. On EAP, configure a HornetQ server, with a bridge to pass messages to ActiveMQ
      2. Configure ActiveMQ so that send() operations fail immediately (no privileges, or insufficient space)
      3. Post a message to the HornetQ destination that is bridged
      4. Note that an exception appears in the EAP log corresponding to the ActiveMQ failure, but the transaction is deemed to be successful. There is no roll-back and nothing is retried.

      More detailed steps will be added.

      Show
      1. On EAP, configure a HornetQ server, with a bridge to pass messages to ActiveMQ 2. Configure ActiveMQ so that send() operations fail immediately (no privileges, or insufficient space) 3. Post a message to the HornetQ destination that is bridged 4. Note that an exception appears in the EAP log corresponding to the ActiveMQ failure, but the transaction is deemed to be successful. There is no roll-back and nothing is retried. More detailed steps will be added.

      An application on EAP (in this case the HornetQ bridge) passes a message to ActiveMQ, as part of an XA transaction, using an XA connection factory. The send() to ActiveMQ fails, for some reason (e.g., insufficient storage). The transaction does not roll back – the consumption by the bridge from HornetQ appears to have succeeded, but the message is lost. Nothing is retried.

      An exception corresponding to the ActiveMQ failure is seen in the EAP logs. However, it can be seen that it is in a different thread of execution from the one that called the send() method to pass the message to ActiveMQ. By the time this exception is raised, the transaction has already completed successfully, so far as EAP is concerned.

      The ActiveMQ connection URI includes jms.useAsyncSend=false, which is supposed to put the send and the transaction commit in to the same thread. However, this attribute appears to have no effect.

            Unassigned Unassigned
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: