BayWa r.e. LUSY Queue Tools

3.4.0 2024-02-01 16:25 UTC

This package is auto-updated.

Last update: 2024-03-30 16:58:44 UTC


README

CircleCI

Installation

To install the Queue tools, you will need Composer in your project:

composer require baywa-re-lusy/queue

Usage

Currently, this library supports AWS SQS and Azure Queue. However, it uses an Adapter pattern to allow adding other vendors easily.

AWS

use BayWaReLusy\QueueTools\QueueService;
use BayWaReLusy\QueueTools\Adapter\AwsSqsAdapter;

$adapter = new AwsSqsAdapter($awsRegion, $awsKey, $awsSecret, $sqsEndpoint);
$queueService = new QueueService($adapter);

The SQS endpoint is optional and is only necessary for non-AWS SQS-providers (like ElasticMQ).

Azure

use BayWaReLusy\QueueTools\QueueService;
use BayWaReLusy\QueueTools\Adapter\AzureQueueAdapter;

$adapter = new AzureQueueAdapter($queueEndpoint, $sasToken);
$queueService = new QueueService($adapter);

If the queue Endpoint doesn't refer to azure (xxx.core.windows.net), it will use the local instance of Azurite instead with default values