What is the best way to work with SQS queues in local environments?

1

I am currently working in an environment based on microservices. In my environments in "production". I have some SQS queues with the names:

-** pro-update-profile**

and for test environments

-** test-update-profile**

I was thinking of setting up a queue called

-** dev-update-profile**

for all developers in their local environments, but they would have message crossing problems when developing and testing in their local environments receiving messages from other developers.

What is the best way to solve this problem? I could also create a queue for each developer with initial prefixes of their names when starting their local environments automatically, but it would have too many queues in SQS.

profile picture
EXPERT
asked 2 years ago7511 views
3 Answers
3
Accepted Answer

My recommendation would be your last option, i.e., create a queue for each developer with their name in the queue name to identify them. I understand that this will create many queues. One way to overcome this would be to create a separate account per developer, or at least per team. This way the number of queues per account will be small.

profile pictureAWS
EXPERT
Uri
answered 2 years ago
profile picture
EXPERT
reviewed a month ago
AWS
EXPERT
Hernito
reviewed 2 years ago
1

Probably you can use localstack for local dev environments, it supports SQS in free version

answered 2 years ago
AWS
EXPERT
Hernito
reviewed 2 years ago
  • Wow, its a great tool!

0

Define "too many queues" - there is no quota on the # of queues in an account. More fundamentally, using a single account like this with only a naming convention separating dev, test, prod queues is inherently risky; an accident could easily place messages in an incorrect queue. The solution is to completely separate the environments. In Azure we would use separate subscriptions/resource groups, in GCP we would use separate projects. In AWS we use separate accounts. Take a look at organizations / control tower so you can 'vend' separate accounts for test, dev, or individuals whenever needed.

kennyk
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions