I'm using SQS as a queue for video encoding and want to ensure that only a single encoding is performed per video.
SQS works fine in that when a message is queued, it will only be received by a single thread. However, it's possible that multiple messages could be sent to the queue for the same video/encoding, meaning the message content would be the same for the particular 'encoding' queue.
Is there anyway to de-duplicate to ensure that for a specific queue, that the messages in the queue or received from a queue, are unique?
One option I thought would be to create a new queue for each encoding type, as the message is sent. So the queue could be named something like encoding-video-id
, which would only have a single message and I could check to ensure that the queue does not yet exist. The only "issue" is that there could be 1000's to 10's of thousands of these queues created.