我试图在交易所上将兔子MQ消息发送到消息队列 - queque-X
带路由键-mc
,CC_3,它在我的本地兔子MQ上得到很好的收到,但在生产兔子MQ上收到该消息没有出现。交换和队列用指定的路由键串成。在下面的消息中, isSent
始终是正确的,但实际上消息并不仅在prod rabbitmq env上的队列中到达。路由键mc
案例敏感吗?
public void sendMessageCenterNotification(Map<String, Object> headerMap,String correlationId,String message) {
boolean isSent = false;
try {
isSent = rabbitMQ.messageSender(message, headerMap, "mc", correlationId);
} catch (Exception e) {
logger.error(correlationId + " - Exception occured in sendMessageCenterNotification:", e);
} finally {
logger.info(correlationId
+ "-inside sendMessageCenterNotification message sending to message center was "+(isSent?"successfull":"failed")+", message:"
+ message);
}
}
来自文档:
粉丝交换将消息路由到所有绑定的队列 对此,路由密钥被忽略。
您可能想要尝试实现目标的不同类型的交换。
作为附带说明,协议(0.9(参考似乎没有提及案例敏感性,但是在客户端实现中,路由密钥是案例敏感的。