骡子发布/主动 - MQ订阅模式。如何在在Active-MQ JMS到达的邮件调用Tomcat的消费者异步方式 [英] Mule Publish/Subscribe model with Active-MQ. How to invoke tomcat-consumers in asynchronously manner upon arriving message in Active-MQ JMS

查看:212
本文介绍了骡子发布/主动 - MQ订阅模式。如何在在Active-MQ JMS到达的邮件调用Tomcat的消费者异步方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

How I can implement JMS publish/subscribe model using Active-MQ. I have a inbound JMS Active-MQ Queue/topic where all messages are coming. On other side I've a couple of outbound Consumer(Tomcat-Http). I would like to implement a publish/Subscribe model in such a way that once I receive a message in Active-MQ it would invoke all tomcat-consumers in asynchronously manner.

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

Is there any way to implement above model in Mule?

推荐答案

使用流量为这样的:

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

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

Of course, you need to configure the ActiveMQ connector:

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

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

Read the following links for more information:

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

这篇关于骡子发布/主动 - MQ订阅模式。如何在在Active-MQ JMS到达的邮件调用Tomcat的消费者异步方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆