Search code examples
gomessage-queue

Delete all the pending KubeMQ messages


I have an integration tests set up which use KubeMQ, and sometimes, when one of them fails to digest all the messages sent in it's test suite the messages can get to the next test and make them fail.

I wan't to know if is there a way to force KubeMQ to drop all the stored messages without killing the KubeMQ connection. The application is in Go and if you have any github.com/kubemq-io/kubemq-go specific solution it would be even better(I was not able to find anything useful in the package).


Solution

  • You can use the AckAll command that will purge all the messages in the queue.