将Mule ESB连接到OpenMQ代理

时间:2013-02-26 16:02:03

标签: mule mule-studio openmq

我正在尝试将Mule ESB连接到现有的OpenMQ代理。从mulesoft docs for openmq integration构建,我有以下流程;

<jms:custom-connector name="Custom_JMS" specification="1.1" 
                      class="com.sun.messaging.ConnectionFactory" 
                      validateConnections="true" doc:name="Custom JMS"/>

<flow name="EchoFlow" doc:name="EchoFlow">

    <jms:inbound-endpoint doc:name="JMS"
                          connector-ref="Custom_JMS" responseTimeout="1000" 
                          topic="mytopic"/>

    <echo-component doc:name="Echo"/>
    <logger message="#[message:payload]" doc:name="Logger"/>
</flow>

但是,我在运行时收到错误;

[02-26 10:54:08] ERROR DefaultMuleApplication [main]: null
org.springframework.beans.NotWritablePropertyException: Invalid property 'acknowledgementMode' of bean class [com.sun.messaging.ConnectionFactory]: Bean property 'acknowledgementMode' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

我觉得这个例子中遗漏了几个元素。有人能告诉我缺少什么吗?

1 个答案:

答案 0 :(得分:2)

AFAIK custom-connector需要一个扩展org.mule.transport.jms.JmsConnector的类。试试这个:

<spring:bean name="connectionFactory" class="com.sun.messaging.ConnectionFactory"/>

<jms:connector name="JMSConnector"
    connectionFactory-ref="connectionFactory"
    specification="1.1"/>