I use a clustered queue to do load balancing on my cluster of server. For each message that my messageListeners (server side) receive I add/update a line in a database. A "job" of a client can consist to send a number of message in the queue which can be quite huge (around 10.000 in 1 minutes).
The problem is that the client have to be able to stop the current job.
Of course,I've thought to create listeners which do nothing after the "stop signal" of the client. But it's not possible as the time to consume those messages could be quite long
So, is it possible to empty a queue even if it still delivering messages?