2017 © Pedro Peláez
 

library service-bus

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

image

prooph/service-bus

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  • Monday, May 14, 2018
  • by prooph
  • Repository
  • 35 Watchers
  • 361 Stars
  • 164,783 Installations
  • PHP
  • 41 Dependents
  • 3 Suggesters
  • 48 Forks
  • 6 Open issues
  • 54 Versions
  • 20 % Grown

The README.md

Prooph Service Bus

PHP 7.1+ lightweight message bus supporting CQRS and Micro Services, (*1)

Build Status Coverage Status Gitter, (*2)

Important

This library will receive support until December 31, 2019 and will then be deprecated., (*3)

For further information see the official announcement here: https://www.sasaprolic.com/2018/08/the-future-of-prooph-components.html, (*4)

Messaging API

prooph/service-bus is a lightweight messaging facade. It allows you to define the API of your model with the help of messages., (*5)

  1. Command messages describe actions your model can handle.
  2. Event messages describe things that happened while your model handled a command.
  3. Query messages describe available information that can be fetched from your (read) model.

prooph/service-bus shields your model. Data input and output ports become irrelevant and no longer influence business logic. We're looking at you Hexagonal Architecture., (*6)

prooph/service-bus decouples your model from any framework. You can use a web framework like Zend, Symfony, Laravel and co. to handle http requests and pass them via prooph/service-bus to your model but you can also receive the same messages via CLI or from a messaging system like RabbitMQ or Beanstalkd., (*7)

It is also a perfect fit for microservices architecture as it provides an abstraction layer for message-based inter-service communication., (*8)

prooph_architecture, (*9)

Installation

You can install prooph/service-bus via composer by running composer require prooph/service-bus, which will install the latest version as requirement to your composer.json., (*10)

Quick Start

<?php

use Prooph\ServiceBus\CommandBus;
use Prooph\ServiceBus\Example\Command\EchoText;
use Prooph\ServiceBus\Plugin\Router\CommandRouter;

$commandBus = new CommandBus();

$router = new CommandRouter();

//Register a callback as CommandHandler for the EchoText command
$router->route('Prooph\ServiceBus\Example\Command\EchoText')
    ->to(function (EchoText $aCommand): void {
        echo $aCommand->getText();
    });

//Expand command bus with the router plugin
$router->attachToMessageBus($commandBus);

//We create a new Command
$echoText = new EchoText('It works');

//... and dispatch it
$commandBus->dispatch($echoText);

//Output should be: It works

Live Coding Introduction

Prooph Service Bus v6, (*11)

Documentation

Documentation is in the docs tree, and can be compiled using bookdown., (*12)

$ php ./vendor/bin/bookdown docs/bookdown.json
$ php -S 0.0.0.0:8080 -t docs/html/

Then browse to http://localhost:8080/, (*13)

Support

Contribute

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation., (*14)

License

Released under the New BSD License., (*15)

The Versions

31/08 2015
21/08 2015
20/08 2015
20/08 2015
02/08 2015

v4.0

4.0.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 messaging cqrs ddd domain-driven design prooph

24/05 2015

v3.2

3.2.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

09/05 2015

v3.1

3.1.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

09/05 2015

v3.0.1

3.0.1.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

01/05 2015

v3.0

3.0.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

13/01 2015
12/01 2015
31/10 2014
30/10 2014
30/10 2014
30/10 2014
05/10 2014

v1.1.0

1.1.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

03/10 2014

v1.0.2

1.0.2.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

28/09 2014

v1.0.1

1.0.1.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

27/09 2014

v1.0.0

1.0.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus

23/09 2014

v0.4.0

0.4.0.0 https://github.com/prooph/service-bus/

PHP Enterprise Service Bus Implementation supporting CQRS and DDD

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

php library zf2 messaging cqrs ddd domain-driven design esb service bus