if (consumer != null) { consumer.close();
try { if (connection != null) { connection.close(); } else if (session != null) { session.close(); } else if (consumer != null) { consumer.close(); } } finally { connection = null; session = null; consumer = null;
    public void destroy() throws Exception {        if (consumer != null) {            consumer.close();        }    }