How to create exclusive queue consumer in Mule?

点点圈 提交于 2019-12-11 01:16:40

问题


In ActiveMQ you configure an exclusive consumer for a queue like:
Queue_Name_Here?consumer.exclusive=true

How to configure an exclusive consumer like above in Mule?


回答1:


You need to URL encode the queue name, as Mule might try to decode the parameters as Mule transport options, which they are not.

<jms:inbound-endpoint queue="Queue_Name_Here%3Fconsumer.exclusive%3Dtrue" 
                      connector-ref="Active_MQ" 
                      doc:name="JMS"/>



回答2:


I was using a jms:activemq-xa-connector for distributed transactions and changed it to a jms:activemq-connector which now works with your URLEncoding solutions. Not sure why distributed transaction connector does not work.

Thanks Petter.



来源:https://stackoverflow.com/questions/25678778/how-to-create-exclusive-queue-consumer-in-mule

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!