Skip to content

4.0 Release The simplest prooph/service-bus ever

Compare
Choose a tag to compare
@codeliner codeliner released this 02 Aug 21:02
· 400 commits to master since this release

This is the fourth major release of prooph/service-bus. It was initially triggered by prooph/common v3.0 but became a complete refactoring. The entire system was reduced to the bare minimum required to do the job of dispatching messages.

We kept the event-driven approach of handling message dispatches but added some new defaults to reduce the number of required plugins (event listeners) and also the number of events being triggered during a message dispatch.
Check out the aligned documentation and the following changelog:

v4.0 was prepared in a feature branch: #55

Removed

  • logger support
    • because it can simply be added with a custom plugin
  • DispatchEvents: CommandDispatch, EventDispatch, QueryDispatch
    • you need to align your custom plugins, checkout the default plugins, should not be complex task
  • fluent interface for $bus->utilize()->utilize() is gone!
  • on/off methods of a bus, same can be achieved with $bus->getActionEventEmitter()->attachListener()
  • Removed CallbackStrategy
    • a callable message handler is invoked by the message bus directly
  • MessageDispatcher invoke strategies
    • with prooph/common v3.0 remote messages are gone and therefor message dispatcher and the entire message handling can be simplified

Changed

  • all plugins moved to namespace Prooph\ServiceBus\Plugin
  • ServiceLocatorProxy renamed to ServiceLocatorPlugin
    • works now with Interop\Container\ContainerInterface
  • Removed all Message\Plugins
    • message dispatcher are now simple callables

Added

  • MessageFactoryPlugin
    • can convert a message given as an array into a message object using a Prooph\Common\Messaging\MessageFactory
    • useful when a consumer of a message queue want to dispatch a message without knowing the message format