如何解决如何在 ActiveMQ Artemis 中镜像队列
我不知道如何在我的 ActiveMQ Artemis 代理中设置镜像。 每条消息都应该按照here的描述进行复制,但问题是如何做到这一点?
我尝试使用非排他性转移,但没有奏效。我在 broker.xml
中定义了这个:
<addresses>
<address name="source.AA">
<multicast>
<queue name="source.AA"/>
</multicast>
</address>
<address name="destination.AA">
<multicast>
<queue name="destination.AA"/>
</multicast>
</address>
</addresses>
<diverts>
<divert name="divert-AA">
<routing-name>divert-AA</routing-name>
<address>source.AA</address>
<forwarding-address>destination.AA</forwarding-address>
<exclusive>false</exclusive>
</divert>
</diverts>
但是,消息不会被复制。我做错了什么?
解决方法
您的配置实际上在 Artemis 2.16.0 上运行良好。我建议看看您是如何向该多播队列生成消息的。
# after server start
$ bin/artemis queue stat --url tcp://localhost:61616 --user admin --password admin | grep .AA
|destination.AA |destination.AA |0 |0 |0 |0 |0 |0 |MULTICAST |
|source.AA |source.AA |0 |0 |0 |0 |0 |0 |MULTICAST |
# after sending 4 messages
$ bin/artemis queue stat --url tcp://localhost:61616 --user admin --password admin | grep .AA
|destination.AA |destination.AA |0 |4 |4 |0 |0 |0 |MULTICAST |
|source.AA |source.AA |0 |4 |4 |0 |0 |0 |MULTICAST |
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。