Set routing key in kaazing jmsclient.js and publish message using amqp

112 Views Asked by At

Can anyone guide me how to use routing key to send/receive message on queue using jmsclient.js. Reference taken from https://demo.kaazing.com/demo/jms/javascript/jms-javascript.html. As of now, i have to create multiple queues with distinct names for the number of consumers listening. I want to have only one queue but with different routing key specified for each consumer.

1

There are 1 best solutions below

1
On

You can set a property with some unique key for each consumer. Then when you consume messages, use a selector. The link you refer to have already an example selector, `symbol=KZNG', but you could use whatever key/value that suits your need.

Something like receiver=CentralAvenueOffice or receiver=theOldFishFactory