https://github.com/wieni/wmqueue_sqs
https://github.com/wieni/wmqueue_sqs
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wieni/wmqueue_sqs
- Owner: wieni
- Created: 2020-05-28T10:04:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T16:57:05.000Z (over 1 year ago)
- Last Synced: 2025-01-27T18:07:59.955Z (4 months ago)
- Language: PHP
- Size: 54.7 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## INTRODUCTION
AWS simple queue services defines a Queue Interface for Amazon SQSThis 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'