}
} else if (parameters.containsKey("Delete")) {
try {
DeleteQueueRequest deleteQueueRequest = new DeleteQueueRequest(queueUrl);
sqs.deleteQueue(deleteQueueRequest);
queueUrls.remove(queueUrl);
logger.debug("event=delete_queue queue_url=" + queueUrl + " user_id= " + userId);
} catch (Exception ex) {
logger.error("event=delete_queue queue_url=" + queueUrl + " user_id= " + userId, ex);
throw new ServletException(ex);
}
} else if (parameters.containsKey("DeleteAll")) {
for (int i = 0; queueUrls != null && i < queueUrls.size(); i++) {
try {
DeleteQueueRequest deleteQueueRequest = new DeleteQueueRequest(queueUrls.get(i));
sqs.deleteQueue(deleteQueueRequest);
logger.debug("event=delete_queue queue_url=" + queueUrls.get(i) + " user_id= " + userId);
} catch (Exception ex) {
logger.error("event=delete_queue queue_url=" + queueUrls.get(i) + " user_id= " + userId, ex);
}