Closed marrrschine closed 4 years ago
Rebus will not generally transfer built-in RabbitMQ headers to the incoming message(*).
It will, however, copy its own headers of outgoing messages to the built-in RabbitMQ header fields when possible, so e.g. Rebus' message ID and correlation ID will be set in the Rebus headers as well as on the RabbitMQ transport message (as you can also see in your screen snip).
Were there any specific RabbitMQ headers you would be interested in seeing on your incoming Rebus messages?
(*) There's one exception: If RabbitMQ's built-in UserId
is set, it will be transferred to the incoming message as rabbitmq-user-id
. Not exactly sure why, but an exception was made in this case.
From Rebus to Rebus this seems to be fine. For any non-Rebus service, these services then would need some kind of awareness to talk rebusish. For the sake of flexibility, in my case it would be very useful to access the correlation_id
as outlined in the screenshot above, since my general inter service communication is not homogeneously built upon Rebus. To access this correlation_id
now, the sender needs to copy it into the headers.
(...) rebusish (...)
😆
I've released Rebus.RabbitMq 7.1.0, where RabbitMQ's correlation ID is passed on to Rebus as rabbitmq-corr-id
. I hope this turns out to be useful 🙂
(PS: Sorry for taking so long to get back to this)
Is there a way to access the properties of a RabbitMq TransportMessage? If so, how? Thanks!