List of usage examples for com.rabbitmq.client Channel getChannelNumber
int getChannelNumber();
From source file:com.esri.geoevent.transport.rabbitmq.RabbitMQChannelListener.java
License:Apache License
@Override public void onRecoveryFailure(Channel channel, Throwable failure) { notifyObservers(RabbitMQConnectionStatus.RECOVERY_FAILED, LOGGER.translate("CHANNEL_RECOVERY_FAILED", channel.getChannelNumber(), failure.getMessage()), channel);/*from ww w . ja v a 2 s . co m*/ }
From source file:com.esri.geoevent.transport.rabbitmq.RabbitMQConsumerListener.java
License:Apache License
@Override public void onRecoveryStarted(Consumer consumer, Channel channel) { notifyObservers(RabbitMQConnectionStatus.RECOVERY_STARTED, LOGGER.translate("CONSUMER_RECOVERY_STARTED", channel.getChannelNumber()), consumer, channel); }
From source file:com.esri.geoevent.transport.rabbitmq.RabbitMQConsumerListener.java
License:Apache License
@Override public void onRecoveryCompleted(Consumer consumer, Channel channel) { notifyObservers(RabbitMQConnectionStatus.RECOVERY_COMPLETED, LOGGER.translate("CONSUMER_RECOVERY_COMPLETED", channel.getChannelNumber()), consumer, channel); }
From source file:com.esri.geoevent.transport.rabbitmq.RabbitMQConsumerListener.java
License:Apache License
@Override public void onRecoveryFailure(Consumer consumer, Channel channel, Throwable failure) { notifyObservers(RabbitMQConnectionStatus.RECOVERY_FAILED, LOGGER.translate("CONSUMER_RECOVERY_FAILED", channel.getChannelNumber(), failure.getMessage()), consumer, channel);//from w ww . ja v a 2s . c om }
From source file:com.github.larsq.spring.embeddedamqp.ChannelWrapper.java
License:Open Source License
public static ChannelWrapper wrap(Channel channel) { return new ChannelWrapper(channel.getChannelNumber()); }
From source file:com.googlesource.gerrit.plugins.rabbitmq.session.type.AMQPSession.java
License:Apache License
private Channel getChannel() { Channel ch = null; if (connection == null) { connect();//from w ww.j ava 2 s . c o m } else { try { ch = connection.createChannel(); ch.addShutdownListener(channelListener); failureCount.set(0); LOGGER.info(MSG("Channel #{} opened."), ch.getChannelNumber()); } catch (IOException ex) { LOGGER.error(MSG("Failed to open channel."), ex); failureCount.incrementAndGet(); } if (failureCount.get() > properties.getSection(Monitor.class).failureCount) { LOGGER.warn("Connection has something wrong. So will be disconnected."); disconnect(); } } return ch; }
From source file:reactor.rabbitmq.LazyChannelPoolTests.java
License:Open Source License
private Channel channel(int channelNumber) { Channel channel = mock(Channel.class); when(channel.getChannelNumber()).thenReturn(channelNumber); when(channel.isOpen()).thenReturn(true); when(channel.getConnection()).thenReturn(connection); return channel; }