I have a use-case where I have 2 SQS queues, each are getting messages. But the condition is if I am getting messages in the FIRST queue, I would stop reading messages from SECOND queue and give priority to the FIRST queue message. Can I handle this using just one SQS poller?
Problem Statement: I often get messages in the FIRST queue, but those are important messages. But I constantly keep on getting messages in the SECOND queue. So, if the poller is processing the message of the SECOND queue, and all of a sudden if a new message comes up in the FIRST queue, then after processing the message of the SECOND queue, it should jump to the FIRST queue and start taking the messages from there until the FIRST queue is empty.
Is there a solution to it?