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

Duplicate messages caused by failover in transacted camel route

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.2.1
    • JBoss A-MQ 6.2, JBoss A-MQ 6.2.1
    • None
    • None

    Description

      I have fabric managed environment with three ssh containers. On container1 and container2 there is master/slave broker configured using shared nfs.

      There is camel route deployed on the third container (called client1). The camel route uses transacted activemq component and transfer messages from queue camel.from to queue camel.to on the broker.

      Then I run following test:

      1. Prefill queue camel.from with 20 000 messages
      2. Start camel route
      3. repeatedly kill master container

      At the end I end up with more than 20 000 messages in the queue B. How many more depends on number of failovers. Last time i got 20 005 with 3 failovers and 5 concurrent consumers.

      camel-context.xml
      <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
      		<property name="brokerURL" value="discovery:(fabric://fabric-group)" />
      		<property name="userName" value="******" />
      		<property name="password" value="******" />
      		<property name="transacted" value="true" />
      		<property name="concurrentConsumers" value="${consumer.count}" />
      
      	</bean>
      
      	<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="camel-queue-transporter">
      		<route id="move-route">
      			<from uri="activemq:{{queue.from}}" />
      			<to uri="activemq:{{queue.to}}" />
      		</route>
      	</camelContext>
      

      There are exceptions in the client1 log file according to rolling back transaction (see attachments).

      Same issue happens also in non-fabric environment (instead of fabric discovery the failover protocol was used: failover:(tcp://broker1, tcp://broker2) in activemq camel component)

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            knetl.j@gmail.com Jakub Knetl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: