Lets say we have a Communication service endpoint, which sends predefined Email/SMS/Viber messages to customers. When SMS gets delivered to a mobile (notifed either through external webhook or periodic status poll), this endpoint raises an event of type CommunicationTaskStatusChanged.
These tasks can be modelled as sagas or separated handlers, which should not matter?
We can have many CRM sagas which request to send some customer communication by sending command to Communication endpoint containing some correlationId property.
All these Sagas are interrested in events CommunicationTaskStatusChanged, which could mean that some SMS or Viber communication got delivered or delivery timed out. These events will bring back the correlationId.
If all Saga handlers have the same signature void Handle(CommunicationTaskStatusChanged message..), then all of these Sagas will be Queried upon their correlation data by the CommunicationTaskStatusChanged mapping. But only one saga type is interrested in the status of this particular communication message. So this seems wrong, to make the infrastructure query sagas that are not involved at all.
Should the CommunicationTaskStatusChanged event somehow be explicitly routed back through auto-correlation, to specific Saga type + Saga Id?
* Note that if it was not CRM sagas, but separate CRM event handlers, during handling we can decide if we are interrested in the StatusChange of this particular predefined Communication task type, not making persistence queries at all.
Something is designed or described wrong here, can someone help me point it out please!
Thanks a lot in advance!