Skip to content

[sqs] Use a queue created in another AWS account. #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

makasim
Copy link
Member

@makasim makasim commented Nov 30, 2018

fixes #596

Queue from another AWS account

SQS allows to use queues from another account. You could set it globally for all queues via option queue_owner_aws_account_id or
per queue using SqsDestination::setQueueOwnerAWSAccountId method.

<?php
use Enqueue\Sqs\SqsConnectionFactory;

// globally for all queues
$factory = new SqsConnectionFactory('sqs:?queue_owner_aws_account_id=awsAccountId');

$context = (new SqsConnectionFactory('sqs:'))->createContext();

// per queue.
$queue = $context->createQueue('foo');
$queue->setQueueOwnerAWSAccountId('awsAccountId');

@makasim makasim merged commit da05a6a into master Nov 30, 2018
@makasim makasim deleted the sqs-use-queue-from-another-account branch November 30, 2018 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make SQSContext configurable
1 participant