Examples of queueBind()


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

        final List<Envelope> received = new ArrayList<Envelope>();

        Channel channel = conn.createChannel();
        channel.queueDeclare("sammyq", false, false, true, null);
        channel.queueBind("sammyq", EXCHANGE, "route1");
        channel.basicConsume("sammyq", true, new DefaultConsumer(channel) {
            @Override
            public void handleDelivery(String consumerTag,
                                       Envelope envelope,
                                       AMQP.BasicProperties properties,
View Full Code Here

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

      boolean durable = true;
      String routingKey = "";
     
      channel.exchangeDeclare(exchangeName, type, durable);
      channel.queueDeclare(queueName, durable, exclusive, autoDelete, null);
      channel.queueBind(queueName, exchangeName, routingKey);
     
      boolean autoAck = false;
      QueueingConsumer consumer = new QueueingConsumer(channel);
      channel.basicConsume(queueName, autoAck, consumer);
     
View Full Code Here

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

        }
    );

    final Channel channel = connection.createChannel();
    channel.queueDeclare(queue, durable, exclusive, autoDelete, null);
    channel.queueBind(queue, exchange, routingKey);
    channel.addShutdownListener(
        new ShutdownListener()
        {
          @Override
          public void shutdownCompleted(ShutdownSignalException cause)
View Full Code Here

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

        try {
            Connection connection = connectionFactory.newConnection(new Address[] { new Address(host) });
            Channel channel = connection.createChannel();

            channel.queueDeclare("testQueue", false, false, false, new HashMap<String, Object>());
            channel.queueBind("testQueue", "amq.topic", "#");

            channel.close();
            connection.close();

        } catch (Exception e) {
View Full Code Here

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

    }

    private void failBind(String queue, HashMap<String, Object> arguments) {
        try {
            Channel ch = connection.createChannel();
            ch.queueBind(queue, "amq.headers", "", arguments);
            fail("Expected failure");
        } catch (IOException e) {
          checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
        }
    }
View Full Code Here

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

        }
    }

    private void succeedBind(String queue, HashMap<String, Object> arguments) throws IOException {
        Channel ch = connection.createChannel();
        ch.queueBind(queue, "amq.headers", "", arguments);
        ch.close();
    }
}
View Full Code Here

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

            Connection connection = factory.newConnection();
            Channel channel = connection.createChannel();

            //  Establish the PUB/SUB wiring
            String queueName = channel.queueDeclare().getQueue();
            channel.queueBind(queueName, "PIPELINE", null);
            QueueingConsumer consumer = new QueueingConsumer(channel);
            channel.basicConsume(queueName, true, consumer);

            for (;;) {
View Full Code Here

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

            Connection connection = factory.newConnection();
            Channel channel = connection.createChannel();

            //  Establish the PUB/SUB wiring
            String queueName = channel.queueDeclare().getQueue();
            channel.queueBind(queueName, "PUBSUB", null);
            QueueingConsumer consumer = new QueueingConsumer(channel);
            channel.basicConsume(queueName, true, consumer);

            for (;;) {
View Full Code Here

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

      System.err.println("Usage: ReceiveLogsDirect [info] [warning] [error]");
      System.exit(1);
    }
   
    for(String severity : argv){   
      channel.queueBind(queueName, EXCHANGE_NAME, severity);
    }
   
    System.out.println(" [*] Waiting for messages. To exit press CTRL+C");

    QueueingConsumer consumer = new QueueingConsumer(channel);
View Full Code Here

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

        System.err.println("Usage: ReceiveLogsTopic [binding_key]...");
        System.exit(1);
      }
   
      for(String bindingKey : argv){   
        channel.queueBind(queueName, EXCHANGE_NAME, bindingKey);
      }
   
      System.out.println(" [*] Waiting for messages. To exit press CTRL+C");

      QueueingConsumer consumer = new QueueingConsumer(channel);
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.