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
EXPERTE
gefragt vor 2 Jahren7630 Aufrufe
3 Antworten
3
Akzeptierte Antwort

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
EXPERTE
Uri
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
AWS
EXPERTE
Hernito
überprüft vor 2 Jahren
1

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

beantwortet vor 2 Jahren
AWS
EXPERTE
Hernito
überprüft vor 2 Jahren
  • 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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen