Availability of SQS Temporary and Virtual Queues in Languages Other Than Java.


Several years ago AWS introduced temporary and virtual queues and put out a Java library. I'd like to implement this in PHP and Golang but it is not available. Is AWS planning to support virtual queues in these languages? If so, when?

Is there a way to use virtual queues in these languages without a library/SDK?

asked 2 years ago1299 views
1 Answer


I understand that you would like to implement Temporary or Virtual queue using PHP and Golang. Our available documentation provides Java library to help you create lightweight Temporary queue.


Java library is just an abstraction layer to handle the underlying implementation that provides two interfaces:  AmazonSQSRequester and AmazonSQSResponder for two-way communication through queues. At this time, we only have Java library that supports this implementation.

I have raised a feature request with our service team on your behalf, to provide AWS solution for Temporary queue in Golang and PHP. While I am unable to comment on if/when this feature may get released, I request you to keep an eye on our What's New (https://aws.amazon.com/new/) and Blog (https://aws.amazon.com/blogs/aws/) pages for any new feature announcements.

Here is an existing public request for Golang implementation: https://github.com/awslabs/amazon-sqs-java-temporary-queues-client/issues/31

Having said that, you can use Java Temporary Queue Client example to re-implement the logic in any other language of your choice, without using SDK or library.

The basic logic for the implementation is to create temporary or virtual queue to which you can send messages. The queue URL for virtual queue uses the format: <host queue URL>#<virtual queue name>. Your custom code will further remove the virtual queue name from virtual queue url, store virtual queue name as an attribute and sends message to host SQS queue. For ReceiveMessage, consumer polls the host queue, checks the virtual queue attribute and store the messages in respective virtual queue in memory. Finally, messages are dispatched to the listener.


answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions