1 Reply Latest reply on Aug 21, 2017 6:55 AM by chiochuan

    Hawtio weird behavior when transactional route is deployed

    maurodewit

      Hi,

       

      Currently we are exploring the possibilities of deploying a transactional route, but we are still having some issues/questions:

      1. Why is hawtio refreshing the Camel and ActiveMQ pages when the route (see below) is deployed? This does not happen when the queues in the uri's are prefixed with 'activemq'. It becomes impossible to browse queues etc.

      2. Is <transacted/> required when using the configuration below?

      3. Is it possible to put the message back on the incoming queue when doing a rollback? Or should it always be put on a DLQ?

       

      I hope any of you can answer some of there questions.

      The above questions apply to the blueprint route shown below.

      The configuration has been taken from (page 12) https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.3/pdf/transaction_guide/Red_Hat_JBoss_Fuse-6.3-Transaction_Guide-en-US.pdf

       

      <camelContext id="txcontext" xmlns="http://camel.apache.org/schema/blueprint">
              <route id="txroute" >
                  <from uri="jmstx:queue:dbk_in" />
                  <transacted/>
                  <to uri="jmstx:queue:dbk_out" />
              </route>
          </camelContext>
          
          <bean id="jmstx" class="org.apache.camel.component.jms.JmsComponent">
              <property name="configuration" ref="jmsConfig" />
          </bean>
          <bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
              <property name="connectionFactory" ref="jmsConnectionFactory"/>
              <property name="transactionManager" ref="jmsTransactionManager"/>
              <property name="transacted" value="true"/>
          </bean>
          <bean id="jmsTransactionManager"
                class="org.springframework.jms.connection.JmsTransactionManager">
              <property name="connectionFactory" ref="jmsConnectionFactory" />
          </bean>
          <bean id="jmsConnectionFactory"
                class="org.apache.activemq.ActiveMQConnectionFactory">
              <property name="brokerURL" value="tcp://localhost:61616"/>
              <property name="userName" value="admin"/>
              <property name="password" value="admin"/>
          </bean>
      </camelContext>
      

       

      Thanks

      Mauro

        • 1. Re: Hawtio weird behavior when transactional route is deployed
          chiochuan

          Hi Mauro,

           

          not sure about you 1st question, but for 2nd and 3rd question, this is based on what i have done via camel.

          2. Is <transacted/> required when using the configuration below?

               yes, i think need to add "<transacted/>" in the route.

           

          3. Is it possible to put the message back on the incoming queue when doing a rollback? Or should it always be put on a DLQ?

              i think is depend on how you going to handle that, if the message is putting back to the incoming queue and if the process failed are due to the message it self, eventually it will end up become infinite loop. 

              in activemq, i think there is config where you can configure the retry value before the message is going to place into DLQ, you also can configure to put it into another Q.