Pablo Ruiz García
Pablo Ruiz García

Reputation: 574

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

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.*..

;)

Upvotes: 2

Views: 276

Answers (1)

Pablo Ruiz García
Pablo Ruiz García

Reputation: 574

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

Asked the question too early.. ;)

Upvotes: 2

Related Questions