简体   繁体   中英

connecting Mule ESB to OpenMQ broker

I'm trying to connect Mule ESB to an existing OpenMQ broker. Building from the mulesoft docs for openmq integration , I have the following flow;

<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>

However, I get an error at runtime;

[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?

I have the feeling several elements have been left out of the example. Can someone tell me what's missing?

AFAIK custom-connector needs a class that extends org.mule.transport.jms.JmsConnector . Try this instead:

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM