Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-2339

[jms] Qpid JMS can ignore transactions right after failover

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.9.0.B2
    • None
    • qpid-jms
    • None
    • False
    • False
    • Undefined
    • Hide

       

      git clone https://github.com/clebertsuconic/springboot-transaction-failover-amqp.git
      cd springboot-transaction-failover-amqp
      git checkout simpleJMS
      mvn -Dactivemq.basedir=/path/to/your/broker clean verify 2>error.log | tee out.log
      

      At the end you should have:

       

      Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@3fd3d49c }
      Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@2cce1da1 }
      Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@76d448e6 }
      Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@309ea91f }
      Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@1148eca4 }
      

       

      It is also useful to direct 2>error.log on my test as there are System.err where you can check what happened to the sends and its exceptions. you would see the send happening of the Messages that ended up on the DLQ.

      Show
        git clone https: //github.com/clebertsuconic/springboot-transaction-failover-amqp.git cd springboot-transaction-failover-amqp git checkout simpleJMS mvn -Dactivemq.basedir=/path/to/your/broker clean verify 2>error.log | tee out.log At the end you should have:   Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@3fd3d49c } Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@2cce1da1 } Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@76d448e6 } Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@309ea91f } Ouch!!! received from DLQ JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@1148eca4 }   It is also useful to direct 2>error.log on my test as there are System.err where you can check what happened to the sends and its exceptions. you would see the send happening of the Messages that ended up on the DLQ.

    Description

      The test I'm attaching will receive a message and send a message to an output queue, using a duplicateID.

       

      receive and send should happen as part of the same transaction.

       

      However, right after the reconnect, from what I debugged when the client called commit, the client got an exception with TX is already rolled back.

       

      On the server's eventually the Declare of the Transaction will happen a millisecond later after the send happened (that is the send sneaked too fast before you could declare the Transaction), as a result some sends (and I suspect ACKs) are happening outside of the transaction.

      Attachments

        Activity

          People

            rhn-support-tbish Tim Bish
            csuconic@redhat.com Clebert Suconic
            Jiri Daněk Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: