vmihailenco / taskq

Golang asynchronous task/job queue with Redis, SQS, IronMQ, and in-memory backends

Home Page:https://taskq.uptrace.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to stop a running queue at runtime??

yedemon opened this issue · comments

I'm curious about how to stop a running queue without stop the programme. Becauze I've to start the queue accordingly. And can't just leave them on the floor.

Please help..

taskq.StopConsumers

Oh, Sorry, I didn't make it clear. I am asking about that "Unregister Queue" interal function. In my scenario, i have a dynamic queue to create. So when the time comes, i have to remove it completely. i have no place to record which task name have been used, and besides new Queue might be different in options. Since there is a "Unregister" function in the internal/base/factory.go, why just holding it back from these main factories, e.g. redisq/factory.go?

Apology if this is being rude :)..