Package com.rabbitmq.client

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


      Channel channel = connection.createChannel(false);
     
      Queue.DeclareOk declareResult = channel.queueDeclare();
      _replyToQueue = declareResult.getQueue();
     
      channel.queueBind(_replyToQueue, getExchange(), _replyToQueue);
      connection.close();
     
    } catch (IOException e) {
      throw new RuntimeException("Failed to create reply to queue", e);
    }
View Full Code Here


        // String queueName = channel.queueDeclare().getQueue();
        // channel.queueBind(queueName, exchangeName, routingKey);
       
        channel.exchangeDeclare(queue, plugin.getExchangeType(), true);
        channel.queueDeclare(queue, plugin.isDurable(), false, false, null);
        channel.queueBind(queue, queue, routingKey);

        // Log Debug
        Logger.info("RabbitMQ Task Channel Available: " + channel);

        // Return Channel
View Full Code Here

      // Get Next Delivery Message
      try {
        // http://www.rabbitmq.com/api-guide.html
        channel.exchangeDeclare(exchangeName, plugin.getExchangeType(), true);
        channel.queueDeclare(queue, plugin.isDurable(), false, false, null);
        channel.queueBind(queue, exchangeName, routingKey);

        // Log Debug
        Logger.info("RabbitMQ Task Channel Available: " + channel);

        // Return Channel
View Full Code Here

        final String routingKey = (String) parameters[2];
        final String clientId = (String) parameters[3];
        try {
          final Channel channel = AmqpOperationFactory.this.amqpDriver.getChannel (clientId);
          if (channel != null) {
            final AMQP.Queue.BindOk outcome = channel.queueBind (queue, exchange, routingKey, null);
            succeeded = (outcome != null);
          }
        } catch (final IOException e) {
          AmqpOperationFactory.this.exceptions.traceIgnoredException (e);
        }
View Full Code Here

        String queueName = channel.queueDeclare("", flags.contains("persistent"), true, false, null).getQueue();
        QueueingConsumer consumer = new QueueingConsumer(channel);
        if (prefetchCount > 0)
          channel.basicQos(prefetchCount);
        channel.basicConsume(queueName, autoAck, consumer);
        channel.queueBind(queueName, exchangeName, id);
        Thread t = new Thread(new Consumer(consumer, id, consumerTxSize, autoAck, stats, timeLimit));
        consumerThreads[i] = t;
        t.start();
      }
      Thread[] producerThreads = new Thread[producerCount];
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.