【问题标题】:connecting Mule ESB to OpenMQ broker将 Mule ESB 连接到 OpenMQ 代理
【发布时间】:2013-02-27 07:12:08
【问题描述】:

我正在尝试将 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?

我感觉这个例子中遗漏了几个元素。谁能告诉我缺少什么?

【问题讨论】:

    标签: mule mule-studio openmq


    【解决方案1】:

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

    【讨论】:

    • 我明白了我是如何误解了 Mulesoft 页面的,现在 - 它没有显示 。以上工作,但失败,因为 openMQ 代理不在 localhost:7676 (omq 默认值)。我试图通过 bean 上的属性提供正确的地址; 但这导致“bean property 'imqAddressList' is not writable or has an invalid setter method...” I'我去阅读 Spring 文档和实验,但也许你马上就知道答案了?
    • 在另一个 omq 问题的回答中找到了我的答案stackoverflow.com/questions/6171457/accessing-openmq-remotely/…>。
    猜你喜欢
    • 2016-03-17
    • 2013-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多