You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to stop consumers manually. I want to handle the onApplicationShutdown NestJS lifecycle hook and, when it is called, stop the SQS consumer and check that there are no jobs running.
I was just looking for this when considering how to stop my queue when hitting rate limits from third parties that it uses to process jobs, with the idea that I can keep track of usage and stop the consumer when I know I am approaching or will exceed rate limits. If anyone knows alternative solution to my problem would be interested in ideas.
Hello,
I'm trying to figure out how to stop consumers manually. I want to handle the
onApplicationShutdown
NestJS lifecycle hook and, when it is called, stop the SQS consumer and check that there are no jobs running.This is the
SqsModuleOptionsFactory
Looking at bbc/sqs-consumer I can see the consumer.stop method, how can I retrieve the consumer to call the stop method?
The text was updated successfully, but these errors were encountered: