Is there a clean way of getting a message's (transport) Id when working with Rebus?

263 Views Asked by At

While working with Rebus+RabbitMq, I would like to access the transport-level message's Id so I can track which messages I have already processed (by persisting the Id) in order to implement some sort of idempotence mechanism.

However, I cannot find a 'clean' way of accessing a message's unique id (the one available at RabbitMq's headers).

It looks like it is not possible, however, I may be missing something... like something hidding at Bus.Advanced.*..

;)

1

There are 1 best solutions below

0
On

Think I found it => MessageContext.GetCurrent().TransportMessageId

Asked the question too early.. ;)