wieni / wmqueue_sqs
Use the Amazon Simple Queue System.
Installs: 522
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 2
Type:drupal-module
Requires
- php: >=7.3
- aws/aws-sdk-php: 3.*
Requires (Dev)
- ergebnis/composer-normalize: ^2.0
- friendsofphp/php-cs-fixer: ^2.13
- wieni/wmcodestyle: ^1.0
This package is auto-updated.
Last update: 2024-11-03 19:32:05 UTC
README
AWS simple queue services defines a Queue Interface for Amazon SQS
This is forked from https://git.drupalcode.org/project/aws_sqs/-/tree/e534becbce062ca741c34806393eb6805895619f/
REQUIREMENTS
Set up your Amazon account and sign up for SQS.
Instructions here:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/GettingSetUp.html
- Create an Amazon account.
- Creating a group, user, and granting that user access to SQS.
- Get set up to submit requests to AWS SQS with PHP.
You may also be interested in documentation on AWS SDK for PHP:
http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/index.html
INSTALLATION
Install module as usual. https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
CONFIGURATION
Enter your AWS credentials.
- Go here: /admin/config/system/aws-queue
- Enter your creds
EXAMPLE CODE
$example_queue = Drupal::service("queue.awssqs")->get("example_queue");
// Get some data
$item = array('test', '1', '2', '3');
// Add the data to the queue
$example_queue->createItem($item);
// Fetch the item from the queue
$item = $example_queue->claimItem();
REPLACE AWS SQS AS DEFAULT QUEUE FOR DRUPAL
The following values can be set in your settings.php file's $settings array to define which services are used for queues
-
queue_reliable_service_$name: The container service to use for the reliable queue $name.
-
queue_service_$name: The container service to use for the queue $name.
-
queue_default: The container service to use by default for queues without overrides. This defaults to 'queue.database'.
Example :- Add following code in settings.php. $settings['queue_default'] = 'wmqueue_sqs.queue_factory'