nservicebusnservicebus-sagas

Can i call a dynamic saga by name?


I have a list of products uniquely identified by name. each product has it's own ordering process. I'd like each products ordering process to be defined by a saga. is there a way for me to process each product using a different saga? Can i use endpoints for this? Would bus.Send(product name, message) work?

I hope this makes sense.


Solution

  • The short answer is no you can't call a saga by name. However, you can easily do this with standard messaging. You would just create a new more specific message which inherits from your product message base class. Then have your product specific saga be started by that message type.