How to create exclusive queue consumer in Mule?

2019-07-16 11:27发布

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?

2条回答
倾城 Initia
2楼-- · 2019-07-16 11:56

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"/>
查看更多
Deceive 欺骗
3楼-- · 2019-07-16 11:58

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.

查看更多
登录 后发表回答