Use Guzzle as message dispatcher for ProophServiceBus.
You can install the dispatcher via composer by adding "prooph/psb-http-dispatcher": "~0.1"
as requirement to your composer.json.
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)
- Ask questions on prooph-users google group.
- File issues at https://github.com/prooph/psb-http-dispatcher/issues.
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.
Released under the New BSD License.