+
 新版

RabbitMQ 中的生产者指定的CorrelationData,在消费者怎么拿到?

Anur 发布于 2018/05/16 09:33
阅读 24K+
收藏 0
 rabbitTemplate.convertAndSend(exchange, routingKey, message, correlationData);

我们在send的时候指定了一个消息id

如何在接收时拿到呢?

 

求解答~扔个文档过来也行!!

加载中
0
Anur
Anur
message.getMessageProperties().getCorrelationId()

这个看起来很像是拿到correlationId的...实际上并不能拿到

0
鸿爪踏雪泥
鸿爪踏雪泥
message.getMessageProperties().getHeaders().get("spring_returned_message_correlation")
李达康吗
李达康吗
这个取到的不是在生产者set的,这个像是spring自动生成的
孙浩plus
孙浩plus
正解
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部