Supporting Multiple SQS Queues for the same message type across different instances

I am using Amazon SQS, and I am wanting to support multiple queues for different environments e.g. mq-dev-OutboundMessage, mq-production-OutboundMessage, mq-alpha-OutboundMessage.

When publishing a message to a queue, we’re able to explicitly set the specific queue url, so this seems not a problem.

Do we have the same level of control when consuming queue messages? When handling an entity type at present I am doing the following:

mqServer1.RegisterHandler(ExecuteMessage, noOfThreads: consumerCount);

Which appears to automatically consume from the queue mq-OutboundMessage.inq

Or is there a better way to handle this ?

Have a look at this answer on specifying a different Queue Prefix.

1 Like

Exactly what I was after, will give this a try thanks so much!

1 Like