Request-Response Pattern in Saga mapping

Question about Saga mapping. My Saga sends a couple messages out to do stuff, and I get back Responses to indicate the work was done. I was adding the IHandleMessage to the Saga and then adding the .MapSaga().ToMessage … however in my Response messages I didnt have any properties to map with. The mere fact that the response came back was all I need to know that the work is complete. In some basic testing without the mapping, it seemed to work.

Given in the Request handler I’m calling context.Reply(), do I need to have a specific Id value to tie back to the specific Saga? Or does the SagaId value in the message header make that connection for me?

And even if that works, is that best practice, or should I always have some unique Id value to map back too?

Hi @StephenB,

When using context.Reply() and replying to a saga instance, messages are automatically correlated. We have some documentation about the auto-correlation feature. However, reading it myself, I’m not sure it’s clear enough. I’ll try to sort it out, meanwhile, I raised Feedback: 'Message Correlation' · Issue #5902 · Particular/docs.particular.net · GitHub