@Override public void basicCancel(String consumerTag) throws IOException { this.delegate.basicCancel(consumerTag); }
@Override public void basicCancel(String consumerTag) throws IOException { delegate.basicCancel(consumerTag); }
@Override public void basicCancel(String consumerTag) throws IOException { this.delegate.basicCancel(consumerTag); }
private static void cancel(Channel channel, String consumerTag) { try { channel.basicCancel(consumerTag); } catch (IOException e) { if (logger.isDebugEnabled()) { logger.debug("Error performing 'basicCancel'", e); } } catch (AlreadyClosedException e) { if (logger.isTraceEnabled()) { logger.trace(channel + " is already closed"); } } }
private static void cancel(Channel channel, String consumerTag) { try { channel.basicCancel(consumerTag); } catch (IOException e) { if (logger.isDebugEnabled()) { logger.debug("Error performing 'basicCancel'", e); } } catch (AlreadyClosedException e) { if (logger.isTraceEnabled()) { logger.trace(channel + " is already closed"); } } }
@Override public synchronized void releaseExternalResources() { try { if (channel != null && channel.isOpen()) { if (consumerTag != null) { channel.basicCancel(consumerTag); } } } catch (Exception ex) { logger.trace("", ex); } }
private void cancelConsumerQuietly(Channel channel, DefaultConsumer consumer) { try { channel.basicCancel(consumer.getConsumerTag()); } catch (Exception e) { if (this.logger.isDebugEnabled()) { this.logger.debug("Failed to cancel consumer: " + consumer, e); } } }
private void cancelConsumerQuietly(Channel channel, DefaultConsumer consumer) { try { channel.basicCancel(consumer.getConsumerTag()); } catch (Exception e) { if (this.logger.isDebugEnabled()) { this.logger.debug("Failed to cancel consumer: " + consumer, e); } } }
/** * Close channel of the consumer */ public void shutDown() { try { channel.basicCancel(tag); } catch (Exception ignored) {} try { channel.close(); } catch (Exception ignored) {} }
/** * Close channel of the consumer */ public void shutDown() { try { channel.basicCancel(tag); } catch (Exception ignored) {} try { channel.close(); } catch (Exception ignored) {} }
/** * Close channel of the consumer */ public void shutDown() { try { channel.basicCancel(tag); } catch (Exception ignored) {} try { channel.close(); } catch (Exception ignored) {} }
private void cancelConsumer(String consumerTag) { try { channel.basicCancel(consumerTag); } catch (IOException ex) { logger.error("Error cancelling consumer for {}: {}", this, ex); counterGroup.incrementAndGet(COUNTER_EXCEPTION); } }
/** * Close channel of the consumer */ public void shutDown() { try { channel.basicCancel(tag); } catch (Exception ignored) {} try { channel.close(); } catch (Exception ignored) {} }
@Override public void basicCancel(String consumerTag, Handler<AsyncResult<Void>> resultHandler) { forChannel(resultHandler, channel -> { channel.basicCancel(consumerTag); return null; }); }
public void StopConsumer(){ try { channel.basicCancel(consumerTag); channel.close(); connection.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
/** * Unbind consumer from channel */ private void stop() throws IOException, TimeoutException { if (channel.isOpen()) { if (tag != null) { channel.basicCancel(tag); } channel.close(); } } }
@Override public void cancel(Handler<AsyncResult<Void>> cancelResult) { AsyncResult<Void> operationResult; try { consumerHandler.getChannel().basicCancel(consumerTag()); operationResult = Future.succeededFuture(); } catch (IOException e) { operationResult = Future.failedFuture(e); } if (cancelResult != null) { cancelResult.handle(operationResult); } handleEnd(); }
@Override public void abort() { try { if (!this.completion.isComplete()) { // not yet cancelled String cT = this.getConsTag(); logger.debug("basicCancel: consumerTag='{}'", cT); this.channel.basicCancel(cT); } } catch (Exception e) { logger.debug("basicCancel threw exception", e); } this.rejecting = true; this.completion.setComplete(); }
protected void setUpMockCancel(Channel channel, final List<Consumer> consumers) throws IOException { final Executor exec = Executors.newCachedThreadPool(); doAnswer(invocation -> { final String consTag = invocation.getArgument(0); exec.execute(() -> consumers.get(Integer.parseInt(consTag)).handleCancelOk(consTag)); return null; }).when(channel).basicCancel(anyString()); }
@OnDestroy public void onShutdown() { try { if (_consumerTag != null) { _channel.basicCancel(_consumerTag); } _channel.close(); _conn.close(); } catch (Exception e) { } } }