You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's quite common for consumers of Merq to provide command handlers that in turn can execute other commands or publish events. So in practice, consumers end up having a dependency on two interfaces whenever this happens.
The combination of both patterns in a single new interface would simplify this scenario, and subsumes both ICommandBus and IEventStream.
The new interface would provide all members of ICommandBus, and for the IEventStream, we'll change the naming to IMessageBus.Observe<TEvent> and IMessageBus.Notify<TEvent>, which are more idiomatic than the existing Of<TEvent> and Push<TEvent>, which wouldn't be quite self-explanatory in the combined interface.
The text was updated successfully, but these errors were encountered:
It's quite common for consumers of Merq to provide command handlers that in turn can execute other commands or publish events. So in practice, consumers end up having a dependency on two interfaces whenever this happens.
The combination of both patterns in a single new interface would simplify this scenario, and subsumes both ICommandBus and IEventStream.
The new interface would provide all members of ICommandBus, and for the IEventStream, we'll change the naming to
IMessageBus.Observe<TEvent>
andIMessageBus.Notify<TEvent>
, which are more idiomatic than the existingOf<TEvent>
andPush<TEvent>
, which wouldn't be quite self-explanatory in the combined interface.The text was updated successfully, but these errors were encountered: