activeMQ集群常见问题
作者:
青风野客 | 来源:发表于
2018-11-08 22:41 被阅读0次
1、关于虚拟主题发送订阅
- 发送主题必须是topic
- 接收主题必须是queue
2、activeMQ插件编写
- 集群会产生NC开头的连接id,此连接用于对其他节点数据转发
- 重写send方法需要屏蔽包含localhost连接id,否则会覆盖掉其他节点设置的属性
@Override
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
if(!producerExchange.getConnectionContext().getClientId().contains("localhost")){
messageSend.setProperty(ptpClientID,producerExchange.getConnectionContext().getClientId());
}
super.send(producerExchange, messageSend);
}
- 对连接ip控制进行屏蔽控制时也需要屏蔽包含localhost 的连接id,否则会导致集群失效
本文标题:activeMQ集群常见问题
本文链接:https://www.haomeiwen.com/subject/lrbgxqtx.html
网友评论