gpt4 book ai didi

java - rabbitmq中的路由键区分大小写吗?

转载 作者:行者123 更新时间:2023-12-02 05:28:00 25 4
gpt4 key购买 nike

我正在尝试使用路由键 -mc 在交换器 - exchange-X 上将rabbit mq消息发送到消息队列 - queque-X code>,它在我的本地rabbit mq上接收良好,但在生产rabbit mq上该消息没有出现。交换器和队列与指定的路由键绑定(bind)。在下面的消息中,isSent始终为true,但实际上消息仅在产品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);
}
}

最佳答案

来自the documentation :

A fanout exchange routes messages to all of the queues that are bound to it and the routing key is ignored.

您可能希望通过不同类型的交换来实现您想要实现的目标。

顺便说一句,协议(protocol) (0.9) 引用似乎没有提及区分大小写,但在客户端实现中路由键区分大小写

关于java - rabbitmq中的路由键区分大小写吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56215168/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com