Skip to content

Releases: prooph/service-bus

4.0 Release The simplest prooph/service-bus ever

02 Aug 21:02
Compare
Choose a tag to compare

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

3.2 Release - QueryBus

24 May 19:01
Compare
Choose a tag to compare

Added

  • with #47 the new bus type QueryBus was added. Please see docs for detailed information.

The new QueryBus shouldn't effect the behaviour of the other buses. If you encounter any problems please report an issue!

3.1 Release

09 May 20:46
Compare
Choose a tag to compare

Changed

  • Support prooph/common v2.0

3.0.1 Patch

09 May 13:26
Compare
Choose a tag to compare

Fixes

  • The ForwardToRemoteMessageDispatcherStrategy used the wrong type hint for a ToRemoteMessageTranslator

3.0 Release

01 May 14:30
Compare
Choose a tag to compare

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

13 Jan 16:41
Compare
Choose a tag to compare
  • 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

12 Jan 22:27
Compare
Choose a tag to compare
  • fixes: #44
  • feature: a listener can unset the exception to prevent a Command-/EventDispatchException

1.3.0 Release

31 Oct 00:04
Compare
Choose a tag to compare

1.2.1 Release

30 Oct 20:53
Compare
Choose a tag to compare

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

30 Oct 19:28
Compare
Choose a tag to compare

New StaticBusRegistry can be used to provide globally available command and event bus.