prooph/service-bus

Introduce direct message routing

Closed this issue · 0 comments

The LocalSynchronousInitiliazer is no good default. Most times you will use the ServiceBus for simple synchronous command/event dispatching. The complete message translation via bus, message dispatcher and receiver is just overhead for this use case.

A simpler solution is required. The idea is that the ServiceBus#route method looks for direct_command_map and direct_event_map configuration. These maps are simple dictionaries where the key is the message name and the value is the handler alias of the services configuration of the ServiceBus. So the ServiceBus can directly detect the appropriate handler an invoke it with the help of an InvokeStrategy.

The LocalSynchronousInitiliazer is no longer required and can be removed.

Depends On

Sub-Tasks