【发布时间】:2020-05-19 20:46:58
【问题描述】:
我有一个地址“pubsub.foo”已经在broker.xml 中配置为多播。
<address name="pubsub.foo">
<multicast/>
</address>
当客户端连接到具有多播元素的地址时,将自动为客户端创建客户端订阅队列。
我正在创建一个简单的实用程序,使用 rhea AMQP Node.js npm 将消息发布到地址。
var connection = require('rhea').connect({ port: args.port, host: args.host, username:'admin', password:'xxxx' });
var sender = connection.open_sender('pubsub.foo');
sender.on('sendable', function(context) {
var m = 'Hii test'
console.log('sent ' + m);
sender.send({body:m});
connection.close();
});
我启用了调试日志,并在运行客户端代码时看到这样的消息。
2020-02-03 22:43:25,071 DEBUG [org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl] Message org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage@68933e4b is not going anywhere as it didn't have a binding on address:pubsub.foo
我还尝试了该主题的不同变体,例如,client1.pubsub.foo、pubsub.foo::client1,但是客户端代码没有运气。请分享你的想法。我是 ActiveMQ Artemis 的新手。
【问题讨论】:
标签: node.js activemq-artemis rhea