Closed ngocnhan-tran1996 closed 1 week ago
The setReceivedExchange
and setReceivedRoutingKey
are for consumer side.
Since there is no options in the org.springframework.amqp.core.Message
fro destination properties, we don't have have unless provide them separately.
This one is going to be follow up as a fix for the https://github.com/spring-projects/spring-amqp/issues/2814
@artembilan
I don't think my issue is still worth anything now since the tags were added here. I was actually trying to change this now and ended up checking at the code "it's already done ?! Did I smoke anything ?"
@vmeunier
I follow your issue and added field exchange/routingkey. I think it will be easier for you to implement metrics/traces, and IMO it's not done yet.
@ngocnhan-tran1996 ok you're right, I don't know why you needed to add those informations, it confused me since I knew I had that stuff to change :)
I believe the original issue talks about adding something like:
.and("messaging.destination.name", context.getExchange())
.and("messaging.rabbitmq.destination.routing_key", context.getRoutingKey());
into out-of-the-box convention. That one is not done yet, so keeping it opened until respective contribution. Thanks
I see https://github.com/spring-projects/spring-amqp/issues/2814 and I think
RabbitMessageSenderContext.java
should have fieldexchange
androutingKey
.But I think it's better if we use
MessageProperties#setReceivedExchange
andMessageProperties#setReceivedRoutingKey
instead.