I am using ActiveMQ 5.15.8. I am connecting to it using STOMP protocol in node.js with library stompit.
Producer Code Snippet:
var headers = {
'destination':'/topic/xyz',
'persistent':'true',
'content-type':'binary/octet-stream',
'content-length':9999,
'selector': "key = 'A'"
}
var frame = client.send(headers)
Consumer Code Subscribe Snippet:
client.subscribe({'ack':'client-individual',
'activemq.retroactive':'true',
'activemq.subscriptionName':'name',
'destination':'/topic/xyz',
'selector':"key = 'A'"},(err,msg)=>{})
The problem is I am not able to get the selectors right. I am not able to receive any message using the above code. I also tried using:
'selector':'key=A'
With this I receive all the messages but not filtered on the key.
Could someone please help me with getting this selector right. Again I am using Node.js library stompit.
Thanks