Would like to understand if there exists a library or some alternative mechanism via which I can resume/restart the execution of the consumer when there are messages in the SQS queue and suspend/sleep them when there are no more messages in the SQS queue to consume.
As of now, the consumer is always running via a while(1) loop. I am looking for a way to restart/suspend the execution of the consumers to improve on their performance of the consumers.
My application is scheduler based and runs after 12 hours. Before the next schedule, the consumers remain idle for almost 4-5 hours.