By using AWS re:Post, you agree to the Terms of Use

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

0

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?

1 Answer
0

Hello,

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.

https://github.com/awslabs/amazon-sqs-java-temporary-queues-client

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.

https://aws.amazon.com/blogs/compute/simple-two-way-messaging-using-the-amazon-sqs-temporary-queue-client/

SUPPORT ENGINEER
answered 9 months 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