0

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=tra‌nsport.prod‌ucer.shippingorder.event&replyToType=Exclusive&requestTimeout=120000")‌​
.log(Logg‌​ingLevel.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?

Peter Keller
  • 7,526
  • 2
  • 26
  • 29
eman
  • 167
  • 3
  • 11
  • 1
    Why do you use topics for request/replies? Usually you would use a queue for that. – Claus Ibsen Jan 25 '13 at 17:56
  • typing mistake, it's a queue – eman Jan 25 '13 at 23:50
  • 2 or more consumers?? Are there any other application consuming your messages? Is your camel bundle started more than once? Otherwise, please post some code etc. for better answers. – Petter Nordlander Jan 26 '13 at 09:35
  • No, the same application, there are not other applications consuming the messages, and the camel bundle started once, **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=tra‌​nsport.producer.shippingorder.event&replyToType=Exclusive&requestTimeout=120000")‌​.log(LoggingLevel.INFO, "Transport1", "router response: ${body}");_ – eman Jan 26 '13 at 11:01
  • Put the code in the question and make it readable. Then its easier for others to read and therefore also to help. – Claus Ibsen Jan 26 '13 at 13:14
  • the code is added on the question – eman Jan 26 '13 at 13:59
  • And you are also doing request/reply on the 1st queue, eg "spirit.adapter.producer.shippingorder.commands". – Claus Ibsen Jan 27 '13 at 07:06
  • And what version of Fuse ESB are you using? – Claus Ibsen Jan 27 '13 at 07:08

2 Answers2

0

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

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
0

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

eman
  • 167
  • 3
  • 11