Q:

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

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?

A:

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

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

