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
专家
已提问 2 年前7629 查看次数
3 回答
3
已接受的回答

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
专家
Uri
已回答 2 年前
profile picture
专家
已审核 1 个月前
AWS
专家
Hernito
已审核 2 年前
1

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

已回答 2 年前
AWS
专家
Hernito
已审核 2 年前
  • 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
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则