Java Code Examples for com.rabbitmq.client.Channel#queuePurge()
The following examples show how to use
com.rabbitmq.client.Channel#queuePurge() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NegativeQueuePurgeTest.java From ballerina-message-broker with Apache License 2.0 | 5 votes |
@Test(description = "Test queue purge on a queue with consumers", expectedExceptions = IOException.class) public void deleteUsedQueue() throws Exception { String queueName = "NegativeQueuePurgeTestDeleteUsedQueue"; Channel channel = amqpConnection.createChannel(); channel.queueDeclare(queueName, false, false, false, null); channel.basicConsume(queueName, new DefaultConsumer(channel)); channel.queuePurge(queueName); }
Example 2
Source File: NegativeQueuePurgeTest.java From ballerina-message-broker with Apache License 2.0 | 4 votes |
@Test(description = "Test queue purge with non existing queue", expectedExceptions = IOException.class) public void purgeNonExistingQueue() throws IOException { Channel channel = amqpConnection.createChannel(); channel.queuePurge("NegativeQueuePurgeTestPurgeNonExistingQueue"); }