camel cxfrs エンドポイントに安静な呼び出しを行い、外部の activeMQ にルーティングするサードパーティ アプリケーションがあります。これらの JMS メッセージを消費し、XML 応答を提供するアプリケーションがあります。これはすべて camel InOut exchangePattern を使用して同期的に行われます。アーキテクチャは非常に単純明快です。activeMQ 5.5.0-fuse、camel-jms 2.8.x、activemq-pool 5.6 を使用していました。
この構成を使用すると、次の例外がランダムに表示されます。
javax.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp- queue://ID:testserver-37266-1366126830205-0:0:1
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1696)
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:74)
at org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:55)
これが発生すると、サーバーは単に停止し、activeMQ、Tomcat、およびその他すべてのサービスを再起動するまで、サービスは応答しません。
ラクダの設定:
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<bean id="routeBuilder" class="gov.nasa.arc.tmi.route.TMIServiceRoute"/>
<bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="marshallerProperties" ref="propertiesMap"/>
</bean>
<util:map id="propertiesMap">
<entry key="jaxb.formatted.output">
<value type="java.lang.Boolean">true</value>
</entry>
</util:map>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="routeBuilder"/>
</camelContext>
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616"/>
Camel Router クラス: //reroute from("cxfrs:/rr?resourceClasses=xyzroute.RerouteResource") .setExchangePattern(ExchangePattern.InOut) .process(new RerouteProcessor()) .to("activemq:queue:xyztmi.request") ;
キューをリッスンするアプリケーションのスプリング構成は次のとおりです。 xyztmi.request は JMS メッセージを消費します。
<context:annotation-config/>
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>tcp://localhost:61616? wireFormat.maxInactivityDurationInitalDelay=30000</value>
</property>
</bean>
<bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
<property name="maxConnections" value="8" />
<property name="connectionFactory" ref="connectionFactory" />
</bean>
<bean id="destination" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg value="gov.nasa.arc.tmi.request"/>
</bean>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="pooledConnectionFactory"/>
<property name="defaultDestination" ref="destination" />
</bean>
<jms:listener-container connection-factory="pooledConnectionFactory" concurrency="10">
<jms:listener destination="gov.nasa.arc.tmi.request" ref="tmiQueryListener" />
グーグルで調べたところ、次のバグに遭遇しました。
https://issues.apache.org/jira/browse/CAMEL-6229 https://issues.apache.org/jira/browse/AMQ-3457
これらに基づいて、camel 2.10.4、activeMq 5.7、activemq-pool 5.7 にアップグレードしました。それでも、問題は残ります。
私は本当に立ち往生しており、この問題を解決する方法がわかりません。何が間違っている可能性があるかを親切に指摘できますか?
ありがとう。