I am running some dramatiq as kubernetes jobs. The usecase require the pods to shutdown if no messages are in the queue. So what I need is that the dramatiq worker process shutsdown if not messages are in the queue.
Is it possible to do that in dramatiq ?
you could use the
@dramatiq.actor(max_retries=-1)decorator, that will result in the worker quitting once it has handled all of the messages in the queue