本文整理了Java中com.rabbitmq.client.Channel.queueUnbind()
方法的一些代码示例,展示了Channel.queueUnbind()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Channel.queueUnbind()
方法的具体详情如下:
包路径:com.rabbitmq.client.Channel
类名称:Channel
方法名:queueUnbind
暂无
代码示例来源:origin: zstackio/zstack
@Override
public void run() throws Throwable {
Channel chan = channelPool.acquire();
try {
chan.queueUnbind(name, BusExchange.P2P.toString(), servId);
} finally {
channelPool.returnChannel(chan);
}
}
});
代码示例来源:origin: zstackio/zstack
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);
}
}
代码示例来源:origin: zstackio/zstack
@Override
public void run() throws Throwable {
Channel chan = channelPool.acquire();
try {
chan.queueUnbind(name, BusExchange.BROADCAST.toString(), "#");
} finally {
channelPool.returnChannel(chan);
}
}
});
代码示例来源:origin: spring-projects/spring-amqp
@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);
}
代码示例来源:origin: org.springframework.amqp/spring-rabbit
@Override
public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue,
String exchange, String routingKey) throws IOException {
return this.delegate.queueUnbind(queue, exchange, routingKey);
}
代码示例来源:origin: org.springframework.amqp/spring-rabbit
@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);
}
代码示例来源:origin: org.smartdeveloperhub.curator/sdh-curator-connector
@Override
public void clean(final Channel channel) throws IOException {
channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey);
}
代码示例来源:origin: spring-projects/spring-amqp
@Override
public com.rabbitmq.client.AMQP.Queue.UnbindOk queueUnbind(String queue,
String exchange, String routingKey) throws IOException {
return this.delegate.queueUnbind(queue, exchange, routingKey);
}
代码示例来源:origin: com.intrbiz.bergamot/bergamot-queue
@Override
protected void removeQueueBinding(Channel on, String binding) throws IOException
{
on.queueUnbind(this.queue, "bergamot.scheduler", binding);
}
};
代码示例来源:origin: com.intrbiz.bergamot/bergamot-queue
@Override
protected void removeQueueBinding(Channel on, String binding) throws IOException
{
on.queueUnbind(this.queue, engineExchangeName, binding);
}
};
代码示例来源:origin: org.smartdeveloperhub.harvesters.it/it-harvester-notification
@Override
public void clean(final Channel channel) throws IOException {
channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey);
}
代码示例来源:origin: org.smartdeveloperhub.harvesters.scm/scm-harvester-backend
@Override
public void clean(final Channel channel) throws IOException {
channel.queueUnbind(this.queueName,this.exchangeName,this.routingKey);
}
代码示例来源:origin: meltwater/rxrabbit
@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);
}
代码示例来源:origin: com.intrbiz.bergamot/bergamot-queue
@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);
}
};
代码示例来源:origin: com.intrbiz.bergamot/bergamot-queue
@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);
}
};
代码示例来源:origin: yanghua/banyan
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();
}
代码示例来源:origin: org.apache.airavata/airavata-messaging-core
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);
}
}
}
代码示例来源:origin: eclipse/flux
@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);
}
}
代码示例来源:origin: net.roboconf/roboconf-messaging-rabbitmq
@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());
}
代码示例来源:origin: org.apache.airavata/airavata-messaging-core
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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!