Is it possible to delete all the messages in a queue quicker than going one-by-one?
I know there is PrefetchCount
in .NET SDK and I read this one: Clearing azure service bus queue in one go, but I couldn't find anything in the Java SDK.
Is it possible to delete all the messages in a queue quicker than going one-by-one?
I know there is PrefetchCount
in .NET SDK and I read this one: Clearing azure service bus queue in one go, but I couldn't find anything in the Java SDK.
The Java SDK is based on the REST api (through Jersey) which does not provide such batch method.
Quick and Fast Solution - You can delete and create queue with JAVA SDK. Refer here - ServiceBusAdministrationClient.java for more details.
Benefits - Clearing messages could take time depends on number of messages. But deletion and creation is very quick. It is beneficial for test cases, but you have to be cautious in prod scenario.