Package Data | |
---|---|
Maintainer Username: | richardkmiller |
Maintainer Contact: | matt@mocavo.com (Matt Garner) |
Package Create Date: | 2014-03-27 |
Package Last Update: | 2014-03-27 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:10:40 |
Package Statistics | |
---|---|
Total Downloads: | 180 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 11 |
Total Forks: | 1 |
Total Open Issues: | 0 |
A queue-backed callback system is designed to add an extra layer of resiliency in communications between APIs on different systems.
Traditionally signaling another API via a synchronous callback required the receiving system to be perpetually available to receive the message. As process flow may rely on the success of this callback, systems can get into inconsistent/out-of-sync states when a callback message fails to be received by the remote system.
Using a local queue to store callback messages allows a completely asynchronous process to be responsible for delivering the callback messages. This decoupling has two primary benefits- first, the original process is no longer responsible for assuring delivery of the callback message and handling communication errors, and second, the primary process is accelerated by not synchronously waiting for the callback to complete.
Add mocavo/queued-http-client
to composer.json
.
"mocavo/queued-http-client": "dev-master"
Run composer update
to pull down QueuedHttpClient.
Now open up app/config/app.php
and add the service provider to your providers
array.
'providers' => array(
'Mocavo\QueuedHttpClient\QueuedHttpClientServiceProvider',
)
and the alias:
'aliases' => array(
'QueuedHttpClient' => 'Mocavo\QueuedHttpClient\Facades\QueuedHttpClient',
)
To be added
php artisan queue:listen --queue="queued_http_requests"