code: public int removeAllMessages(String queueName) {
          try {
              return getQueueControl(queueName).removeMessages(null);
          } catch (Exception e) {
              throw new AsyncException(e);
          }
      }
docs: Removes all messages from queue.
  
  @param queueName queue name.
  @return number of messages removed