我有简单的骡子设置。从JMS队列处理消息中读取以及在发送到DLQ的异常情况下。使用Mule 3.3.0和HornetQ 2.3.0.BETA1。我得到以下例外:
Caused by: java.lang.ClassCastException: org.mule.transport.jms.ReusableTopicSessionWrapper cannot be cast to javax.jms.QueueSession
at org.mule.transport.jms.Jms102bSupport.createDestination(Jms102bSupport.java:231)
at org.mule.transport.jms.Jms11Support.createDestination(Jms11Support.java:142)
at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:163)
at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:81)
at org.mule.transport.AbstractMessageDispatcher.process(AbstractMessageDispatcher.java:99)
... 113 more
我的设置:
<jms:connector name="connector.jms" maxRedelivery="10" doc:name="JMS"
jndiInitialFactory="org.jnp.interfaces.NamingContextFactory"
jndiProviderUrl="jnp://localhost:1099"
connectionFactoryJndiName="ConnectionFactory"
createMultipleTransactedReceivers="true"
numberOfConcurrentTransactedReceivers="100"
acknowledgementMode="AUTO_ACKNOWLEDGE">
<reconnect-forever frequency="5000"/>
</jms:connector>
<flow name="jmsListenerFlow1" doc:name="jmsListenerFlow1">
<jms:inbound-endpoint queue="adsLogQueue" connector-ref="connector.jms" doc:name="JMS">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:inbound-endpoint>
<component >
<spring-object bean="logSaver"/>
</component>
<catch-exception-strategy>
<jms:outbound-endpoint queue="DLQ"> <!-- [2] -->
<jms:transaction action="ALWAYS_JOIN" />
</jms:outbound-endpoint>
</catch-exception-strategy>
</flow>
它可能是骡子本身的错误吗?或者我做错了什么?
答案 0 :(得分:0)
在specification="1.1"
上设置jms:connector
。