Releases: prooph/service-bus
4.0 Release The simplest prooph/service-bus ever
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
- works now with
- 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
- can convert a message given as an array into a message object using a
3.2 Release - QueryBus
3.1 Release
Changed
- Support prooph/common v2.0
3.0.1 Patch
Fixes
- The ForwardToRemoteMessageDispatcherStrategy used the wrong type hint for a ToRemoteMessageTranslator
3.0 Release
Complete Rewrite
With the 3.0 release we've decoupled prooph/service-bus from ZF2 components by using prooph/common contracts. We've also moved all base classes for messaging like Command, Event, StandardMessage and so on to the prooph/common package to provide a better interoperability between prooph components.
These changes introduce a lot of BC breaks. Class names, namespaces and interfaces were changed.
It is recommended to use prooph/service-bus v3.0 only for new projects! Otherwise you will need some time to align your system.
Added
- The error message of a CommandDispatch- or EventDispatchException now includes the error message of the caught \Exception.
Changed
- Support for PHP 5.4 is gone. PHP 5.5+ is required - BC break!
- HandleCommandStrategy now looks for a
handle
method without appending the command name - BC break! - Use Psr\Log\LoggerInterface instead of Zend\Log\LoggerInterface - BC break!
- Manage dispatch processes with the help of Prooph\Common\Event* components - BC break!
- Replace the ZF2ServiceLocatorProxy plugin with ServiceLocatorProxy plugin which works with a Prooph\Common\ServiceLocator implementation - BC break!
- Messaging base classes are moved to prooph/common - BC break!
- Invoke Strategy ForwardToMessageDispatcher is renamed to ForwardToRemoteMessageDispatcher - BC break!
- InMemoryMessageDispatcher renamed to InMemoryRemoteMessageDispatcher - BC break!
- Remove EventManager from InMemoryRemoteMessageDispatcher - BC break!
- Interface MessageDispatcherInterface is now called RemoteMessageDispatcher - BC break!
- Interface ToMessageTranslatorInterface is now called ToRemoteMessageTranslator - BC break!
- Class ToMessageTranslator is now called ProophDomainMessageToRemoteMessageTranslator - BC break!
- Class FromMessageTranslator is now called FromRemoteMessageTranslator - BC break!
2.0 Major Release
- CommandBus and EventBus got a new shared basic implementation: MessageBus
- CommandDispatch and EventDispatch got also a new shared basic implementation: MessageDispatch
Most of the public API is not effected by the changes except the fluent interface support of Command-/EventDispatch. It is gone due to this article by Ocramius.
We never used it. So we hope you will don't miss it, too.
Most benefit of the changes is a leaner and simpler codebase and it is now easier to write plugins that can listen on both buses. See the simplified FromMessageTranslator as an example.
1.3.1 Patch
- fixes: #44
- feature: a listener can unset the exception to prevent a Command-/EventDispatchException
1.3.0 Release
Added a RegexRouter
1.2.1 Release
Fixes two issues:
- FromMessageTranslator now checks if message name is an existing class
and uses this class to reconstitute command or event instead of the default implementation - HandleCommandInvokeStrategy and OnEventInvokeStrategy now check if command/event implements
MessageNameProviderInterface and if so they use the message name instead of the classname
1.2 Release
New StaticBusRegistry can be used to provide globally available command and event bus.