【发布时间】:2019-08-04 19:48:04
【问题描述】:
我正在使用 ActiveMQ 5.15.8。我使用 node.js 中的 STOMP 协议和库 stompit 连接到它。
生产者代码片段:
var headers = {
'destination':'/topic/xyz',
'persistent':'true',
'content-type':'binary/octet-stream',
'content-length':9999,
'selector': "key = 'A'"
}
var frame = client.send(headers)
消费者代码订阅片段:
client.subscribe({'ack':'client-individual',
'activemq.retroactive':'true',
'activemq.subscriptionName':'name',
'destination':'/topic/xyz',
'selector':"key = 'A'"},(err,msg)=>{})
问题是我无法正确选择选择器。我无法使用上述代码接收任何消息。我也尝试过使用:
'selector':'key=A'
有了这个,我收到了所有的消息,但没有在密钥上过滤。
谁能帮我把这个选择器弄好。我再次使用 Node.js 库 stompit。
谢谢
【问题讨论】:
标签: node.js jms activemq stomp