disque icon indicating copy to clipboard operation
disque copied to clipboard

Provide a way to flush a queue?

Open marcosnils opened this issue 9 years ago • 9 comments

marcosnils avatar Apr 28 '15 04:04 marcosnils

May you provide more details? Examples:

  1. Single node or cluster wide?
  2. Just the queue or also all the jobs inside the queue? And in this case again, should the jobs be evicted cluster-wide?

I can see how sometimes you may want to start from scratch btw, so likely this is going to be needed in one form or the other. A typical example would be an error in the producer that creates a number of useless jobs that can't be processed at all. Another one is development setups.

antirez avatar Apr 28 '15 13:04 antirez

Testing. During setup you want to wipe up all the queues, otherwise you end of processing jobs from the previous test case/run.

assaf avatar Apr 29 '15 01:04 assaf

Discussed this with @antirez yesterday. @assaf: for testing, you can run DEBUG FLUSHALL.

djanowski avatar Apr 30 '15 15:04 djanowski

@antirez @djanowski sorry I haven't had time to clarify my proposal. I'll provide further info later.

marcosnils avatar Apr 30 '15 15:04 marcosnils

@djanowski did you come to a conclusion with antirez?

marcosnils avatar Apr 30 '15 15:04 marcosnils

I'll re-evaluate this in the next days before 1.0-RC1.

antirez avatar Nov 28 '15 10:11 antirez

I'm interested in this also. This would be pretty useful for a huge number of reasons e.g. clearing a queue that a client has flooded with bogus messages.

This is what I propose the command would look like:

QFLUSH <queue> [TTL] [timestamp]

  • TTL sec flush jobs with a TTL less than this value
  • timestamp flush jobs created after this timestamp

jabinb avatar Dec 18 '15 05:12 jabinb

Any plans for this?

mustafaakin avatar Feb 16 '16 09:02 mustafaakin

I'd like to see this as well. I've found that it's possible to get into a deadlocked situation where no new messages can be added due to an out of memory condition. Having an easy way to flush a queue from the cluster would be useful when situations like this occur.

aclemmensen avatar Sep 02 '16 13:09 aclemmensen