I have confirmed with Mulesoft and WMQ Connector doesn't support Publish/Subscribe to Queue.
So, alternative solution could be....
Solution
Use a standard JMS connector, pointing to a Spring bean defined Connection Factory.
Procedure
1 - Create a Spring Bean Connection factory
2 - Create a standard JMS connector and point to the Connection Factory defined in the previous step using a connectionFactory-ref attribute
3 - Create Publishers using <jms:outbound-endpoint ...> elements
4 - Create Subscribers using <jms:inbound-endpoint ...> elements
You can use wildcards in the topic name, so you can match more than one node in a topic tree:
In the previous sample, the inbound endpoint is subscribed to any node in the topic tree that starts with TEST. In the provided sample application it will receive messages from both TEST/TOPIC/1 and TEST/TOPIC/2.
Sample Application
Please refer to the attached configuration file.
You must create a properties file named wmq.properties and place it in the classpath. The required properties are as follow:
wmq.hostName
wmq.port
wmq.queueManager
wmq.channel
wmq.username
wmq.password
You should change the topics names to match the ones used in your environment. To run the application as is, ensure that the following topics are created:
TEST/TOPIC/1
TEST/TOPIC/2
To test the application issue the following commands from the prompt (requires curl):
curl -v -X GET http://localhost:8081/input
curl -v -X GET http://localhost:8082/input
You should be able to see an output like:
INFO 2013-07-23 17:40:26,539 [[wmq-topics].Subscriber3.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Received by Subscriber3: TESTING TEST/TOPIC/1
INFO 2013-07-23 17:40:26,539 [[wmq-topics].Subscriber1.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Received by Subscriber1: TESTING TEST/TOPIC/1
INFO 2013-07-23 17:40:36,183 [[wmq-topics].Subscriber3.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Received by Subscriber3: TESTING TEST/TOPIC/2
INFO 2013-07-23 17:40:36,183 [[wmq-topics].Subscriber2.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Received by Subscriber2: TESTING TEST/TOPIC/2