Examples of queueDeclarePassive()


Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

        final String clientId = (String) parameters[5];
        final Channel channel = AmqpOperationFactory.this.amqpDriver.getChannel (clientId);
        if (channel != null) {
          AMQP.Queue.DeclareOk outcome = null;
          if (passive) {
            outcome = channel.queueDeclarePassive (queue);
          } else {
            outcome = channel.queueDeclare (queue, durable, exclusive, autoDelete, null);
          }
          succeeded = (outcome != null);
        }
View Full Code Here

Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

    Connection connection = mock(Connection.class);
    Channel channel = mock(Channel.class);

    when(connectionFactory.createConnection()).thenReturn(connection);
    when(connection.createChannel(Mockito.anyBoolean())).thenReturn(channel);
    when(channel.queueDeclarePassive(Mockito.anyString()))
        .then(new Answer<Object>() {

          @Override
          public Object answer(InvocationOnMock invocation) throws Throwable {
            Object arg = invocation.getArguments()[0];
View Full Code Here

Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

    connectionFactory.setHost("localhost");
    connectionFactory.setPort(BrokerTestUtils.getPort());
    Connection connection = connectionFactory.newConnection();
    Channel channel = connection.createChannel();
    try {
      DeclareOk result = channel.queueDeclarePassive(queue.getName());
      return result != null;
    } catch (IOException e) {
      return e.getCause().getMessage().contains("RESOURCE_LOCKED");
    } finally {
      connection.close();
View Full Code Here

Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

          boolean available = true;
          String queue = iterator.next();
          Channel channel = null;
          try {
            channel = this.connectionFactory.createConnection().createChannel(false);
            channel.queueDeclarePassive(queue);
            if (logger.isInfoEnabled()) {
              logger.info("Queue '" + queue + "' is now available");
            }
          }
          catch (IOException e) {
View Full Code Here

Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
    Channel channel = this.connectionFactory.createConnection().createChannel(false);
    channel.queueDeclarePassive("mismatch.bar");
    this.admin.deleteQueue("mismatch.bar");
    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
View Full Code Here

Examples of com.rabbitmq.client.Channel.queueDeclarePassive()

    context.setEnvironment(env);
    context.refresh();
    context.getBean(CachingConnectionFactory.class).createConnection();
    context.destroy();
    Channel channel = this.connectionFactory.createConnection().createChannel(false);
    channel.queueDeclarePassive("mismatch.bar");
    this.admin.deleteQueue("mismatch.bar");
    assertNotNull(this.admin.getQueueProperties("mismatch.foo"));
    assertNull(this.admin.getQueueProperties("mismatch.bar"));

    env = new StandardEnvironment();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.