1
因为我被困在最可能最简单的Mule ESB/JMS用例中,所以忍受着我。我试图让一个Mule应用程序接受来自现有HornetQ队列的传入消息。下面提供了我的mule-config.xml。我的问题是这样的;只要消息生产者向队列中添加消息,HornetQ就会报告消息达到了给定消息的重新传递尝试的最大次数,并将其发送给死信队列 - 显然永远不会被Mule JMS入站 - 端点。这只发生在Mule服务器运行时(注意应用程序在Mule服务器中正常部署而没有问题很重要),当它不是时,提供程序当然不会尝试任何预期的交付。我已经在其他应用程序中使用hornet配置将消息监听器设置为相同的HornetQ实例而没有问题。任何援助将不胜感激。Mule ESB HornetQ JMS消息未发布
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.4/mule.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.4/mule-jms.xsd">
<beans:bean id="hornetConnectionFactory" class="org.hornetq.jms.client.HornetQXAConnectionFactory">
<beans:constructor-arg name="ha" value="false" />
<beans:constructor-arg>
<beans:bean class="org.hornetq.api.core.TransportConfiguration">
<beans:constructor-arg value="org.hornetq.core.remoting.impl.netty.NettyConnectorFactory" />
<beans:constructor-arg>
<beans:map key-type="java.lang.String" value-type="java.lang.Object">
<beans:entry key="host" value="localhost"/>
<beans:entry key="port" value="5445"/>
</beans:map>
</beans:constructor-arg>
</beans:bean>
</beans:constructor-arg>
</beans:bean>
<beans:bean id="cachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<beans:constructor-arg ref="hornetConnectionFactory" />
</beans:bean>
<beans:bean id="transactionalConnectionFactory" class="org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy">
<beans:property name="targetConnectionFactory" ref="cachingConnectionFactory" />
<beans:property name="synchedLocalTransactionAllowed" value="true" />
</beans:bean>
<jms:connector name="jmsConnector" specification="1.1" connectionFactory-ref="transactionalConnectionFactory"
validateConnections="true" acknowledgementMode="AUTO_ACKNOWLEDGE" disableTemporaryReplyToDestinations="true" />
<flow name="MyFlow">
<jms:inbound-endpoint connector-ref="jmsConnector" queue="MyQueue"
exchange-pattern="one-way" />
<logger message="Message #[payload.id] processed successfully" level="DEBUG"/>
</flow>
</mule>