1 Reply Latest reply on Nov 10, 2016 8:06 PM by igarashitm

    Transactions-Switchyard,HornetQ and Camel

    ravi21588

      Hi All

      I have refracted my question with a sample app and trace logs.

      I have created a switchyard component with jms binding and camel implementation - This component picks the message from TransactionRequestQueue and puts in TransactionResponseQueue,in case of any exception ie., connection not available or queue not available the transaction needs to rollback and put the message in error queue.i have set the address setting for TransactionRequestQueue  to try for 4 times with a delay of 5 secs.

       

      Steps as below:

       

      Created two queues as below,in order to rollback the transaction,i did not create the TransactionResponseQueue.

       

      <jms-queue name="TransactionRequestQueue">

                              <entry name="java:/jms/queue/TransactionRequestQueue,java:jboss/exported/jms/queue/TransactionRequestQueue"/>

                              <durable>true</durable>

                          </jms-queue>

                          <jms-queue name="TransactionErrorQueue">

                              <entry name="java:/jms/queue/TransactionErrorQueue,java:jboss/exported/jms/queue/TransactionErrorQueue"/>

                              <durable>true</durable>

      </jms-queue>

       

      Address Setting configuration :

       

      <address-setting match="jms.queue.TransactionRequestQueue">

                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                              <redelivery-delay>5000</redelivery-delay>

                              <max-delivery-attempts>4</max-delivery-attempts>

      </address-setting>

       

      I have used global transaction policy in switchyard component and suspended it before sending to Error Queue.

      But the message is not being sent to Error queue.Attached sample app and Trace logs

      Can you please let me know what is the problem.

      Help Appreciated.