Mule使用JMS主题消息

时间:2015-05-15 00:13:05

标签: mule

我的流程是:

 <flow name="activemqFlow3" doc:name="activemqFlow3">
        <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="producetopic"  doc:name="HTTP"/>
        <set-payload value="===TOPIC===" doc:name="Set Payload"/>
        <jms:outbound-endpoint topic="sfdc" connector-ref="Active_MQ" doc:name="JMS"  />
    </flow>
    <flow name="activemqFlow4" doc:name="activemqFlow4">
        <jms:inbound-endpoint doc:name="JMS" connector-ref="Active_MQ" topic="sfdc"/>
        <logger message="===#[message.payload]" level="INFO" doc:name="Logger"/>
    </flow>

AcitveMQ控制台在主题部分下显示一个消费者,但是一旦点击http://localhost:9001/producetopic网址,我就不会在anypoint工作室控制台中收到立即响应。当我转到AcitveMQ控制台http://localhost:8161/admin/topics.jsp并选择sfdc主题时,发送按钮将在Anypoint studio控制台中获得响应。 为什么我发布主题时立即响应/订阅不显示?

  

修改

全球元素:

<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/>

控制台:

INFO  2015-05-15 07:56:21,820 [main] org.mule.module.launcher.DeploymentDirectoryWatcher: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Mule is up and kicking (every 5000ms)                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO  2015-05-15 07:56:29,081 [[sfdc].activemqFlow4.stage1.02] org.mule.api.processor.LoggerMessageProcessor: ======TOPIC===

1 个答案:

答案 0 :(得分:0)

这是我的错,服务器在控制台中显示数据。为了更好地理解,我修改了订阅者记录器以区分数据和发布者。

<logger message="==Subscriber=#[message.payload]====" level="INFO" doc:name="Logger"/>

现在控制台显示:

 ==Subscriber====TOPIC=======