Hi Filipe,
“A saga instance is never invoked concurrently by multiple threads. Therefore, a sequencing policy for a saga is irrelevant. Axon will ensure each saga instance receives the events it needs to process in the order they have been published on the event bus.” - https://docs.axoniq.io/reference-guide/axon-framework/events/event-processors#parallel-processing
A regular event handler (supported by Tracking Processors) scales better:
Tracking processors can use multiple threads to process an event stream. They do so by claiming a segment that is identified by a number. Normally, a single thread will process a single segment and the number of segments/threads can be configured in this case.
In comparison to regular Event Handlers, Sagas are persisting the state in some DB. Sagas are stateful. Regular Event Handlers do not persist its state in the DB (they do not have this step), which can influence performances in a positive way. DB operations are expensive.
If you can switch from Sagas to regular Event handlers to achieve the same goal (and implement Saga pattern), it would perform better in my opinion. This can be an easy or hard thing to do, and it depends on how much of the state you keep in your current Saga. If your current Saga keeps mostly associations
, then you could use messages (events, commands) to share these associations, rather than keeping the state of the Saga component itself.
I hope this helps,
Ivan