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
ESPERTO
posta 2 anni fa7626 visualizzazioni
3 Risposte
3
Risposta accettata

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
ESPERTO
Uri
con risposta 2 anni fa
profile picture
ESPERTO
verificato un mese fa
AWS
ESPERTO
Hernito
verificato 2 anni fa
1

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

con risposta 2 anni fa
AWS
ESPERTO
Hernito
verificato 2 anni fa
  • 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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande