werkspot/message-bus-werkspot-message-queue-adapter

This package is abandoned and no longer maintained. No replacement package was suggested.

The adapter that allows for werkspot/message-queue to be used with werkspot/message-bus.

dev-master / 1.0.x-dev 2017-10-09 13:38 UTC

This package is auto-updated.

Last update: 2020-10-21 07:22:22 UTC


README

Author Software License Latest Version Total Downloads

Build Status Coverage Status Quality Score

This is an adapter around Werkspot\MessageQueue, so Werkspot\MessageBus can use it and still be decoupled.

Usage

The MessageDispatcher is the entry point to the message bus. There are already a few middlewares provided with this library, which you can find in src/Bus/DeliveryChain.

    use Werkspot\MessageBus\MessageQueue\WerkspotMessageQueue\MessageQueueService;
    use Werkspot\MessageQueue\MessageQueueService as WerkspotMessageQueueService;

    $message = new AsynchronousMessage('payload', 'destination', ['metadata']);

    $messageQueueService = new MessageQueueService(new WerkspotMessageQueueService(/* ... */));

    $messageQueueService->enqueueMessage($message);

Installation

To install the library, run the command below and you will get the latest version:

composer require werkspot/message-bus-werkspot-message-queue-adapter

Tests

To execute the tests run:

make test

Coverage

To generate the test coverage run:

make test_with_coverage

Code standards

To fix the code standards run:

make cs-fix