You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my usecase i'd like two different sagas (that don't know about eachother) to be able to consume the same message type. Currently this doesn't seem possible as NSaga's design seems to assume that Sagas will never be initiatedby or consume the same message types. For example; in the mediator it's expecting 1 saga for a given initiating message.
Currently I have to work around this issue by copy/pasting my message types so that each saga has it's own messages, even though they do the same thing.
For context, i have raw messages from a queue automatically being converted into saga messages.
The text was updated successfully, but these errors were encountered:
@Place1 So if we get a message that starts multiple sagas, which one of the sagas should start? All of them? If there is a message that can be consumed by multiple sagas, which one should consume the message? What about order?
Good questions that i'm not 100% sure how to answer yet, but here are my thoughts:
if we get a message that starts multiple sagas, which one of the sagas should start?
I think if the message can initiate<> many sagas, they should all start.
If there is a message that can be consumed by multiple sagas, which one should consume the message?
again, i think they should all run.
What about order?
order is tricky. i think NSaga should not guarantee any execution order. Perhaps NSaga can implement an interface that allows the ordering behavior to be controlled. Library users could then implement this behavior if they need specific ordering.
what should happen with CorrelationId of saga when multiple sagas are started by the same message?
I think this is a tricky question. Perhaps correlation Ids should be prefixed with something that identifies the saga. The mediator should then handle this when passing messages to sagas. The saga identifier could also be useful to map an OperationResult to the particular Saga that returned it.
In my usecase i'd like two different sagas (that don't know about eachother) to be able to consume the same message type. Currently this doesn't seem possible as NSaga's design seems to assume that Sagas will never be initiatedby or consume the same message types. For example; in the mediator it's expecting 1 saga for a given initiating message.
Currently I have to work around this issue by copy/pasting my message types so that each saga has it's own messages, even though they do the same thing.
For context, i have raw messages from a queue automatically being converted into saga messages.
The text was updated successfully, but these errors were encountered: