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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南