Saga Multi-threaded ?


We have a Saga that does a command that takes several seconds to complete. We have to wait for the result to define the next step in the Saga and we send the command with sendAndWait.
This means that the Saga overal performance is very poor.

Is it possible to configure a Saga to have a multi threaded/segment event listener or another way to overcome a sendAndWait?

Kind regards,

We solved this by making the Saga dispatch the command asynchronously. Then its event handler method returns. The command handler publishes an event with the results of the operation when it’s finished, and the event is handled by the Saga. The Saga is thus never tying up a thread waiting for the command to run.

There may be other ways to solve the problem, but this technique has been working pretty well for us for years.