Hi All-
The problem was caused by some bugs in camel-jms 2.9.x which was shipped in Fuse ESB 7.0.1 and solved in Fuse ESB 7.1.0
Replies are not consumed from reply queue
-
05-03-2022 - |
質問
I'm sending messages with InOut pattern to a JMS queue and set the replyTo to a predefined queue. sometimes everything works fine and sometimes camel wont read replies from that queue and fail with TimedOutException. sometimes I can see 2 or more consumers on the reply queue (using AMQ web console) but camel wont consume it.
When I see one consumer on the reply queue (using AMQ web console), everything works fine
and when I see many consumers on the reply queue (using AMQ web console), camel wont read replies from that queue and fail with TimedOutException.
Environment : Fuse ESB
Java Code
from("activemq:spirit.adapter.producer.shippingorder.commands")
.id("router-Shipping-Order-Commands")
.log(LoggingLevel.INFO, "Transport1", "router-Shipping-Order-Commands request: ${body}")
.to("activemq:transport.consumer.shippingorder.commands?replyTo=transport.producer.shippingorder.event&replyToType=Exclusive&requestTimeout=120000")
.log(LoggingLevel.INFO, "Transport1", "router response: ${body}");
activemq configuration
<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://10.10.40.94:61616"/>
</bean>
<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
init-method="start" destroy-method="stop">
<property name="maxConnections" value="1" />
<property name="connectionFactory" ref="jmsConnectionFactory" />
</bean>
<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="pooledConnectionFactory" />
</bean>
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="configuration" ref="jmsConfig" />
</bean>
This configuration is written in the camel-context.xml file and in the same file there is another activemq configuration used for another route
could you please advise?
解決 2
他のヒント
Can you post your activemq configuration you are using? For example make sure you configure the init and destroy methods on the pool so it can properly start|stop as documented here: http://camel.apache.org/activemq