Mule Publish/Subscribe model with Active-MQ. How t

2019-10-20 14:22发布

我如何能实现JMS发布/使用Active-MQ订阅模型。 我有一个入站JMS有源MQ队列/主题,所有的消息都来了。 在另一边我有一对夫妇外出消费(Tomcat的HTTP)的。 我想以这样的方式,一旦我在Active-MQ收到一条消息,它会调用所有的tomcat-消费者在异步的方式来实现发布/订阅模式。

有什么办法来实现骡子上面的模型?

Answer 1:

使用这种流:

<flow name="amq2http">
  <jms:inbound-endpoint queue="yourQueue" />
  <http:outbound-endpoint address="http://whatever.url" />
</flow>

当然,你需要配置ActiveMQ的连接器:

<jms:activemq-connector name="jmsConnector" brokerURL="tcp://localhost:61616"/>

更多信息请阅读以下链接:

  • http://www.mulesoft.org/documentation/display/current/ActiveMQ+Integration
  • http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference


文章来源: Mule Publish/Subscribe model with Active-MQ. How to invoke tomcat-consumers in asynchronously manner upon arriving message in Active-MQ JMS