Problem Statement: In "JTA/XA" mode when messages are consumed from "Source-Q" using camel and after performing the business logic(successful processing without any error or exception) unable to send the response back to "Destination-Q".
Enabled "camel" logging but no "errors/exceptions" are found for the "Destination- end point".
Used Tech Stack:
- JBoss Wildfly 10 (on Windows)
- activemq-rar-5.11.0.redhat-630356.rar (latest as per https://maven.repository.redhat.com/ga/org/apache/activemq/activemq-rar/)
- camel-2.15.3
- Red Hat AMQ 7.2 (Linux). Used "artemis create" to create an instance with default configurations.
"Resource adaptor approach" is followed with JBoss Wildfly 10 to integrate with Red Hat MQ 7.2.
Snippets from JBoss Wildfly 10 - "standalone.xml" configurations are provided below:
<subsystem xmlns="urn:jboss:domain:resource-adapters:4.0">
<resource-adapters>
<resource-adapter id="activemq">
<archive>
activemq-rar-5.11.0.redhat-630356.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<config-property name="ServerUrl">
tcp://redhatamqhostname:61616?jms.redeliveryPolicy.maximumRedeliveries=2
</config-property>
<config-property name="UserName">
defaultUser
</config-property>
<config-property name="InitialRedeliveryDelay">
1000
</config-property>
<config-property name="Password">
defaultPassword
</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:/XAconnectionFactory" enabled="true" use-java-context="true" pool-name="ConnectionFactory">
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>false</prefill>
<is-same-rm-override>false</is-same-rm-override>
</xa-pool>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
Snippets from "camel-context" configurations are provided below:
<bean id="JBOSSRMQ" class="org.apache.camel.component.jms.JmsComponent">
<property name="configuration">
<bean class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="connectionFactory" />
<property name="transactionManager" ref="transactionManager" />
<property name="transacted" value="false" />
<property name="concurrentConsumers" value="1" />
<property name="deliveryPersistent" value="true" />
<property name="requestTimeout" value="10000" />
<property name="cacheLevelName" value="CACHE_NONE" />
</bean>
</property>
</bean>
<jee:jndi-lookup id="connectionFactory" jndi-name="java:/XAconnectionFactory"/>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
Any ideas/thoughts to make it work? Thanks in advance!