gdaws/stompit

Cannot filter message using selector

Closed this issue · 1 comments

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.

use key:value in header (key:A) to send through producer and that should work.