prooph / psb-http-producer
Http Message Producer for Prooph Service Bus using guzzle
Installs: 3 361
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 5
Forks: 5
Open Issues: 2
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.0
- php-http/discovery: ^1.2.1
- php-http/httplug: ^1.1
- php-http/message-factory: ^1.0.2
- php-http/promise: ^1.0
- prooph/service-bus: ^6.0
- psr/http-message: ^1.0.1
Requires (Dev)
- malukenho/docheader: ^0.1.4
- phpspec/prophecy: ^1.7
- phpunit/phpunit: ^6.0
- prooph/php-cs-fixer-config: ^0.1.1
- psr/container: ^1.0
- react/promise: ^2.5
- sandrokeil/interop-config: ^2.0.1
- satooshi/php-coveralls: ^1.0
Suggests
- psr/container: ^1.0 for usage of provided factories
- sandrokeil/interop-config: For usage of provided factories
This package is auto-updated.
Last update: 2024-12-17 02:13:15 UTC
README
Use php-http/httplug as message producer for Prooph Service Bus. Works together with all bus types: CommandBus, EventBus and QueryBus.
Important
This library will receive support until December 31, 2019 and will then be deprecated.
For further information see the official announcement here: https://www.sasaprolic.com/2018/08/the-future-of-prooph-components.html
Installation
You can install the producer via composer by adding "prooph/psb-http-producer": "^1.0"
as requirement to your composer.json.
Usage
Pass a ready-to-use Http\Client\HttpClient
to Prooph\ServiceBus\Message\Http\HttpMessageProducer
together with a Prooph\Common\Messaging\MessageConverter
.
For async requests use an Http\Client\HttpAsyncClient
with \Prooph\ServiceBus\Message\Http\HttpAsyncMessageProducer
.
The MessageProducer sends a POST request to an endpoint specified by a psr-7 URI (using psr/http-message
) with the json encoded message as body.
An async request means that when the producer is used for querying remote services (QueryBus) the producer does not wait until the promise gets resolved.
For an overview of all ready-to-use http client implementations, check the official documentation of php-http.
Support
- Ask questions on Stack Overflow tagged with #prooph.
- File issues at https://github.com/prooph/psb-http-producer/issues.
- Say hello in the prooph gitter chat.
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.