den0
den0

Reputation: 186

How to keep track of replies with AWS sqs?

I am using AWS sqs to pass along jobs from webservers to a worker manager which launches ec2 workers. When a message is passed to the worker manager, it reads it and launches a worker. I want to return the workers IP. How would I go along implementing this? Should I create a separate queue for responses and label the messages some identifier to keep track of a job or some other way?

Thanks in advance,

Upvotes: 0

Views: 438

Answers (1)

Mark B
Mark B

Reputation: 201028

Jobs should have IDs, probably UUIDs or something similar. Then you need to send a "reply" message to the task originator somehow, with the ID. However you do that it will not be via the same SQS queue that the manager received the message. Your question doesn't provide enough details regarding the process that creates the original message for me to give a concrete answer regarding the method of sending a "reply" message.

Upvotes: 1

Related Questions