@RequestMapping(value = "/purge", method = RequestMethod.GET)
@ResponseBody
public String purgeQueue() {
RabbitAdmin admin = new RabbitAdmin(rabbitTemplate.getConnectionFactory());
admin.purgeQueue(QueueNames.WORK_QUEUE_NAME, true);
admin.purgeQueue(QueueNames.RESULT_QUEUE_NAME, true);
return QueueNames.WORK_QUEUE_NAME + "and " + QueueNames.RESULT_QUEUE_NAME + " queues were purged.";
}
@RequestMapping(value = "/queue", method = RequestMethod.GET)