By jmarbachdo
Hi,
I am trying to set up a First In, First Out (FIFO) queue using DigitalOcean’s Managed Redis hosting instead of AWS SQS. Now that I’ve set up and successfully connected to my Redis cluster, I am wondering:
Any recommendations or pointers to other reference material would be appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Redis is a caching database with key-value pairs. It is not a queueing storage, so it would not guarantee the FIFO sequence.
What I can recommend to you is to check the pub-sub model of Redis and publish the messages as soon as they arrive at a processing unit. You can learn more about this at Redis documentation.
So, to answer your question:
How can I push new JSON objects to a FIFO queue in my cluster using REST HTTP requests?
You will “publish” the messages on a topic. You can create a single topic to publish all the objects to or create a partition in the topics. But this will not be REST API, rather it will use Redis protocol. Please see the link I provided above.
How can I read from my FIFO queue using REST HTTP requests?
You will “subscribe” to the topic and listen for any messages on that topic thread. As soon as the message arrives, you will be able to process it.
Here is a sample application that I developed using .NET to send and receive messages (like a chat application) using Redis; please read here
Following up with the solution we ended up choosing:
We deployed a managed RabbitMQ instance on DigitalOcean, courtesy of https://www.cloudamqp.com/. RabbitMQ lets us set up various queues and then send and receive messages over HTTP: https://www.cloudamqp.com/docs/http.html
Because we can transmit messages to RabbitMQ using HTTP, we’re able to easily make use of web-based automation tools.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.