Thanks a lot for your reply.
Actually we are not using command gateway and send out events from Saga (instead of commands) and intercept events in the saga with appropriate identifier.
This works out well however with only 1 topic and multiple saga’s, we were ending up defining distinct events for each saga even though they signified the same thing.
Would be great if you could provide an example of configuring a different publisher bean for each saga. The examples I referred to seem to be of Axon v 3.x.
Following is our event model for implementing saga – right now we need to define at least 8 distinct events for each saga (assuming each saga has minimum 2 participants).
These events could be generalized as follows:
InitiateParticipantEvent (1 for each participant)
ParticipantSuccessEvent (1 for each participant)
ParticipantFailureEvent (1 for each participant)
However, as we use only 1 channel of communication (1 topic), we can’t use generic events as they get intercepted by all saga managers and event handlers from each microservice, if we use different topics – 1 for each saga, we might be able to use generic events.