@Override public void run() throws Throwable { Channel chan = channelPool.acquire(); try { chan.queueUnbind(name, BusExchange.P2P.toString(), servId); } finally { channelPool.returnChannel(chan); } } });
public void unlisten(Event evt, EventListenerWrapper l) { String type = evt.getType().toString(); try { synchronized (listeners) { List<EventListenerWrapper> lst = listeners.get(type); if (lst == null) { return; } lst.remove(l); if (lst.isEmpty()) { listeners.remove(type); eventChan.queueUnbind(queueName, BusExchange.BROADCAST.toString(), type); logger.debug(String.format("[unlistening event]: %s", type)); } } } catch (IOException e) { throw new CloudRuntimeException(e); } }
@Override public void run() throws Throwable { Channel chan = channelPool.acquire(); try { chan.queueUnbind(name, BusExchange.BROADCAST.toString(), "#"); } finally { channelPool.returnChannel(chan); } } });
@Override public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException { return this.delegate.queueUnbind(queue, exchange, routingKey, arguments); }
@Override public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey) throws IOException { return this.delegate.queueUnbind(queue, exchange, routingKey); }
@Override public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException { return this.delegate.queueUnbind(queue, exchange, routingKey, arguments); }
@Override public void clean(final Channel channel) throws IOException { channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey); }
@Override public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey) throws IOException { return this.delegate.queueUnbind(queue, exchange, routingKey); }
@Override protected void removeQueueBinding(Channel on, String binding) throws IOException { on.queueUnbind(this.queue, "bergamot.scheduler", binding); } };
@Override protected void removeQueueBinding(Channel on, String binding) throws IOException { on.queueUnbind(this.queue, engineExchangeName, binding); } };
@Override public void clean(final Channel channel) throws IOException { channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey); }
@Override public void clean(final Channel channel) throws IOException { channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey); }
@Override public AMQP.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException { return delegate.queueUnbind(queue,exchange,routingKey,arguments); }
@Override protected void removeQueueBinding(Channel on, String binding) throws IOException { // seems odd, but unbind is non-idempotent, binding then unbinding is a poor workaround on.queueBind(this.queue, "bergamot.result", binding); on.queueUnbind(this.queue, "bergamot.result", binding); } };
@Override protected void removeQueueBinding(Channel on, String binding) throws IOException { // seems odd, but unbind is non-idempotent, binding then unbinding is a poor workaround on.queueBind(this.queue, "bergamot.reading", binding); on.queueUnbind(this.queue, "bergamot.reading", binding); } };
public void unbind(String queueName, String unbindTo, String routingKey) throws IOException { super.init(); if (queueName.isEmpty()) { logger.error("[unbind] queueName is empty"); throw new IOException("[unbind] queueName is empty"); } if (unbindTo.isEmpty()) { logger.error("[ubind] unbindTo param is empty"); throw new IOException("[ubind] unbindTo param is empty"); } if (!this.innerExists(queueName, this.channel)) { logger.error("[unbind] queue : " + queueName + " is not exists"); } if (!this.innerExists(unbindTo, this.channel)) { logger.error("[unbind] unbind queue : " + unbindTo + " is not exists"); } this.channel.queueUnbind(queueName, unbindTo, routingKey); super.close(); }
public void stopListen(final String id) throws AiravataException { QueueDetails details = queueDetailsMap.get(id); if (details != null) { try { for (String key : details.getRoutingKeys()) { channel.queueUnbind(details.getQueueName(), taskLaunchExchangeName, key); } } catch (IOException e) { String msg = "could not un-bind queue: " + details.getQueueName() + " for exchange " + taskLaunchExchangeName; log.debug(msg); } } }
@Override public void disconnectFromChannelSync(String channelName) throws Exception { boolean notifyNeeded = false; synchronized (this) { if (isConnected(channelName)) { String topic = channelNameToTopicPattern(channelName); this.channel.queueUnbind(this.inbox, this.outbox, topic); connectedChannels.remove(channelName); notifyNeeded = true; } } if (notifyNeeded) { //Take care to call the listeners outside synch block to avoid potential deadlocks notifyChannelDisconnected(channelName); } }
@Override public void unsubscribe( MessagingContext ctx ) throws IOException { // Un-subscribing means deleting a routing key between an exchange and a queue. String exchangeName = RabbitMqUtils.buildExchangeName( ctx ); String queueName = getQueueName(); this.logger.fine( "Unbinding queue " + queueName + " and exchange " + exchangeName + " with routing key = " + ctx.getTopicName()); this.channel.queueUnbind( queueName, exchangeName, ctx.getTopicName()); }
public void stopListen(final String id) throws AiravataException { QueueDetails details = queueDetailsMap.get(id); if (details != null) { try { for (String key : details.getRoutingKeys()) { channel.queueUnbind(details.getQueueName(), exchangeName, key); } channel.queueDelete(details.getQueueName(), true, true); } catch (IOException e) { String msg = "could not un-bind queue: " + details.getQueueName() + " for exchange " + exchangeName; log.debug(msg); } } }