[英][RabbitMQ][Spring] How do I get access to the final exchange name?
For an Exchange-to-Exchange binding definintion 对于Exchange到Exchange的绑定定义
public class RabbitRecieveTest implements MessageListener {
@Override
public void onMessage(Message message) {
String firstExchange = message.getMessageProperties().getReceivedExchange();
}
}
returns the first exchange name. 返回第一个交易所名称。
Scenario: 场景:
Message published to firstExchange <---binding--->secondExchange<---binding---->someQueue<--- listener 消息发布到firstExchange <--- binding ---> secondExchange <--- binding ----> someQueue <---侦听器
I would like to get the name of the secondExchange. 我想获取secondExchange的名称。 Is there a way? 有办法吗?
否,无法获取此信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.