I currently configured rebus to direct all messages in MyMessages assembly to the process managers input queue. Suppose in MyMessage assembly I have a message called SomethingHappened which will be used to trigger other actions in process managers (e.g. DoSomethingElse). However, I also want to subscribe SomethingHappened locally (in the same queue) to update the database. So the workflow will look like:
- User trigger the action DoSomething in the UI
- The handler of DoSomething updates the object state and publish events SomethingHappened internally (in memory collection of uncommitted events)
- SomethingHappened events get published by rebus to the queue by go through all uncomitted events in the object
- Handle SomethingHappened locally to update database
- Handle SomethingHappened remotely by saga to trigger SomethingElseHappened
Is this possible to be configured in rebus?
The rebus configuration I currently have:
<rebus inputQueue="input" errorQueue="error" workers="1" maxRetries="5">
<endpoints>
<add messages="MyMessages" endpoint="processManagers.input"/>
</endpoints>
</rebus>
Thank You
Yin