Hi Flo, thank you for the kind words.

In my case I needed to use an in-memory SQS to use with unit testing. I only needed basic functionality to Receive, Send, Delete and ChangeVisibility. Originally I just used a slice. However, when I was bench testing with thousands of messages the Delete and ChangeVisibility operations were becoming slower (since it always has to do a full scan of all messages to find them by ID).

I needed to use a data structure that would maintain the insert order (queue order), but also allowed me to delete and update any message by its ID in O(1) time.

Written by

I’m a data nerd and TDD enthusiast originally from Sydney. Currently working for Uber in New York. My thoughts here are my own. 🤓 elliotchance@gmail.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store