kangkot / psb-http-dispatcher

Http message dispatcher for ProophServiceBus using guzzle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guzzle HTTP message dispatcher for ProophServiceBus

Build Status

Use Guzzle as message dispatcher for ProophServiceBus.

Installation

You can install the dispatcher via composer by adding "prooph/psb-http-dispatcher": "~0.1" as requirement to your composer.json.

Usage

Pass a ready-to-use GuzzleHttp\Client to Prooph\ServiceBus\Message\Http\MessageDispatcher and you are done. The MessageDispatcher sends a POST request to <URL>/api/messages with the json encoded message as body. You should set the base url, host, port, etc. as default options for the guzzle client. If your http endpoint uses another resource than /api/messages you can override the default by passing the resource as second argument to Prooph\ServiceBus\Message\Http\MessageDispatcher. With the third argument of Prooph\ServiceBus\Message\Http\MessageDispatcher you can enable the future mode available since Guzzle 5.0+ (see Guzzle docs for details)

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.

License

Released under the New BSD License.

About

Http message dispatcher for ProophServiceBus using guzzle

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 100.0%