Tabnine Logo
Channel.exchangeDeclarePassive
Code IndexAdd Tabnine to your IDE (free)

How to use
exchangeDeclarePassive
method
in
com.rabbitmq.client.Channel

Best Java code snippets using com.rabbitmq.client.Channel.exchangeDeclarePassive (Showing top 20 results out of 315)

origin: spring-projects/spring-amqp

@Override
public DeclareOk exchangeDeclarePassive(String name) throws IOException {
  return this.delegate.exchangeDeclarePassive(name);
}
origin: yanghua/banyan

private boolean innerExists(String exchangeName, Channel outerChannel) {
  boolean result = true;
  try {
    outerChannel.exchangeDeclarePassive(exchangeName);
  } catch (IOException e) {
    result = false;
  }
  return result;
}
origin: org.springframework.amqp/spring-rabbit

@Override
public DeclareOk exchangeDeclarePassive(String name) throws IOException {
  return this.delegate.exchangeDeclarePassive(name);
}
origin: meltwater/rxrabbit

@Override
public AMQP.Exchange.DeclareOk exchangeDeclarePassive(String name) throws IOException {
  return delegate.exchangeDeclarePassive(name);
}
origin: yanghua/banyan

public boolean exchangeExists(String exchangeName) throws IOException {
  super.init();
  boolean result = true;
  try {
    this.channel.exchangeDeclarePassive(exchangeName);
  } catch (IOException e) {
    result = false;
  }
  super.close();
  return result;
}
origin: yanghua/banyan

private boolean exchangeExists(String exchangeName) throws IOException {
  boolean result = true;
  try {
    channel.exchangeDeclarePassive(exchangeName);
  } catch (IOException e) {
    result = false;
    if (!channel.isOpen()) {
      super.init();
    }
  }
  return result;
}
origin: org.apache.axis2.transport/axis2-transport-rabbitmq-amqp

  channel.exchangeDeclarePassive(exchangeName);
  exchangeAvailable = true;
} catch (IOException e) {
origin: rapportive-oss/storm-amqp-spout

/**
 * Verifies the exchange exists, creates an exclusive, server-named queue
 * and binds it to the exchange.
 *
 * @return the server's response to the successful queue declaration (you
 *         can use this to discover the name of the queue).
 *
 * @throws IOException  if the exchange does not exist, or if the AMQP
 *                      connection drops.
 */
@Override
public Queue.DeclareOk declare(Channel channel) throws IOException {
  channel.exchangeDeclarePassive(exchange);
  final Queue.DeclareOk queue = channel.queueDeclare();
  channel.queueBind(queue.getQueue(), exchange, routingKey);
  return queue;
}
origin: org.apache.camel/camel-rabbitmq

private void declareExchange(final Channel channel, final String exchange, final String exchangeType, final Map<String, Object> exchangeArgs) throws IOException {
  if (endpoint.isPassive()) {
    channel.exchangeDeclarePassive(exchange);
  } else {
    channel.exchangeDeclare(exchange, exchangeType, endpoint.isDurable(), endpoint.isAutoDelete(), exchangeArgs);
  }
}
origin: rapportive-oss/storm-amqp-spout

/**
 * Verifies the exchange exists, creates the named queue if it does not
 * exist, and binds it to the exchange.
 *
 * @return the server's response to the successful queue declaration.
 *
 * @throws IOException  if the exchange does not exist, the queue could not
 *                      be declared, or if the AMQP connection drops.
 */
@Override
public Queue.DeclareOk declare(Channel channel) throws IOException {
  channel.exchangeDeclarePassive(exchange);
  final Queue.DeclareOk queue = channel.queueDeclare(
      queueName,
      /* durable */ true,
      /* non-exclusive */ false,
      /* non-auto-delete */ false,
      /* no arguments */ null);
  channel.queueBind(queue.getQueue(), exchange, routingKey);
  return queue;
}
origin: org.apache.axis2.transport/axis2-transport-rabbitmq-amqp

  rmqChannel.getChannel().exchangeDeclarePassive(exchangeName);
  exchangeAvailable = true;
} catch (IOException e) {
origin: eclipse/ditto

@Override
protected void preEnhancement(final ReceiveBuilder receiveBuilder) {
  receiveBuilder
      .match(ChannelCreated.class, channelCreated -> {
        this.channelActor = channelCreated.channel();
        addressMetric = ConnectivityModelFactory.newAddressMetric(ConnectionStatus.OPEN,
            "Started at " + Instant.now(), 0, null);
        final Set<String> exchanges = targets.stream()
            .map(t -> toPublishTarget(t.getAddress()))
            .map(RabbitMQTarget::getExchange)
            .collect(Collectors.toSet());
        final ChannelMessage channelMessage = ChannelMessage.apply(channel -> {
          exchanges.forEach(exchange -> {
            log.debug("Checking for existence of exchange <{}>", exchange);
            try {
              channel.exchangeDeclarePassive(exchange);
            } catch (final IOException e) {
              log.warning("Failed to declare exchange <{}> passively", exchange);
              addressMetric = ConnectivityModelFactory.newAddressMetric(ConnectionStatus.FAILED,
                  "Exchange '" + exchange + "' was missing at " + Instant.now(), 0, null);
            }
          });
          return null;
        }, false);
        channelCreated.channel().tell(channelMessage, getSelf());
      });
}
origin: org.eclipse.ditto/ditto-services-connectivity-messaging

@Override
protected void preEnhancement(final ReceiveBuilder receiveBuilder) {
  receiveBuilder
      .match(ChannelCreated.class, channelCreated -> {
        this.channelActor = channelCreated.channel();
        addressMetric = ConnectivityModelFactory.newAddressMetric(ConnectionStatus.OPEN,
            "Started at " + Instant.now(), 0, null);
        final Set<String> exchanges = targets.stream()
            .map(t -> toPublishTarget(t.getAddress()))
            .map(RabbitMQTarget::getExchange)
            .collect(Collectors.toSet());
        final ChannelMessage channelMessage = ChannelMessage.apply(channel -> {
          exchanges.forEach(exchange -> {
            log.debug("Checking for existence of exchange <{}>", exchange);
            try {
              channel.exchangeDeclarePassive(exchange);
            } catch (final IOException e) {
              log.warning("Failed to declare exchange <{}> passively", exchange);
              addressMetric = ConnectivityModelFactory.newAddressMetric(ConnectionStatus.FAILED,
                  "Exchange '" + exchange + "' was missing at " + Instant.now(), 0, null);
            }
          });
          return null;
        }, false);
        channelCreated.channel().tell(channelMessage, getSelf());
      });
}
origin: spring-projects/spring-amqp

  channel.exchangeDeclarePassive(exchangeName);
  return null;
});
origin: org.wso2.extension.siddhi.io.rabbitmq/siddhi-io-rabbitmq

  channel.exchangeDeclarePassive(exchangeName);
} catch (Exception e) {
  channel = connection.createChannel();
origin: wso2/wso2-synapse

  channel.exchangeDeclarePassive(exchangeName);
} catch (java.io.IOException e) {
  logger.info("Exchange :" + exchangeName + " not found. Declaring exchange.");
origin: espertechinc/esper

channel.exchangeDeclarePassive(settings.getExchange());
origin: org.openbaton/registration

channel.exchangeDeclarePassive("openbaton-exchange");
channel.queueDeclarePassive("nfvo.manager.handling");
channel.basicQos(1);
origin: openbaton/NFVO

channel.exchangeDeclarePassive("openbaton-exchange");
channel.queueDeclarePassive("nfvo.manager.handling");
channel.basicQos(1);
origin: espertechinc/esper

channel.exchangeDeclarePassive(settings.getExchange());
com.rabbitmq.clientChannelexchangeDeclarePassive

Popular methods of Channel

  • basicPublish
  • queueDeclare
  • close
  • basicConsume
  • basicAck
  • exchangeDeclare
  • queueBind
  • isOpen
  • basicQos
  • basicCancel
  • basicNack
  • basicGet
  • basicNack,
  • basicGet,
  • confirmSelect,
  • queueDeclarePassive,
  • queueDelete,
  • basicReject,
  • queueUnbind,
  • getConnection,
  • txCommit

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now