I have a Service called DataProcessService
which is deployed with multiple instances in the service for scaling.
The DataProcessService
has SQS consumer which receives a message from the SQS topic, once the process is done the service deletes the message from the queue.
I have enabled SQS message visibility-timeout as 15 mins
Now the problem I have is:
one of the instances of DataProcessService
receives a message and do the processing and takes more then 15 mins, meanwhile other instance receives the same message due the 15mins visibility-timeout.
How to make sure, if an instance is still processing the message, and make sure another instance does not pick the message to process