if (channel == null) {
logger.error("Already Unregistered the listener");
throw new AiravataMonitorException("Already Unregistered the listener");
} else {
try {
channel.queueUnbind(channel.queueDeclare().getQueue(), "glue2.computing_activity", CommonUtils.getRoutingKey(monitorID));
channel.close();
channel.getConnection().close();
availableChannels.remove(channelID);
} catch (IOException e) {
logger.error("Error unregistering the listener");