In NServiceBus, response messages contain a correlation id which is set to the same value as the id of the request message. This is how it works out of the box.
The best way to correlate NServiceBus response messages?
-
24-06-2022 - |
Question
What would be the recommended way of correlating message replied to the original request?
Is there a way to tie the response to the original request that doesn't involve manually setting a property in the response message?
I mean I'm sure I can create a property called RequestId and set the OriginalRequestId to the response message, but this seems to be a bit of plumbing work that the framework should be able to handle.
If I can, is there a way to customize how the original Ids are generated? I'm trying to get away from having to persist the RequestId above in some persistence in order to create a context.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow