1

I have SQS working with Laravel. All works well but I really need to be able to access the Queue properties. I know AWS/SQS provides these methods and I see protected methods when I look at the contents of

Queue::getSqs()

But not seeing any native Laravel way to access the queue attributes. How can I access them?

2 Answers 2

4

You are correct - they are protected methods. But when you run Queue::getSqs() - it is returning the underlying SQS instance - which means you have access to those methods.

So this works:

$list = Queue::getSqs()->listQueues();

As does this:

$attr = Queue::getSqs()->getQueueAttributes(array('QueueUrl' => 'string'));

A full list of available commands is here at the AWS website.

Sign up to request clarification or add additional context in comments.

1 Comment

@Phirschybar - did that answer your question?
0

Looking at the API I believe you can access the raw attributes with Queue::getSqsJob(). Worth a shot, I can't test as I am on the road.

http://laravel.com/api/class-Illuminate.Queue.Jobs.SqsJob.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.