Examples of basicQos()


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

        String q1 = declareBindConsume(ch1, c1, false);
        String q2 = declareBindConsume(ch2, c2, false);
        ch1.basicConsume(q2, false, c1);
        ch2.basicConsume(q1, false, c2);
        ch1.basicQos(1);
        ch2.basicQos(1);
        fill(5);
        Queue<Delivery> d1 = drain(c1, 1);
        Queue<Delivery> d2 = drain(c2, 1);
        ackDelivery(ch1, d1.remove(), true);
        ackDelivery(ch2, d2.remove(), true);
View Full Code Here

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

        List<Double> plateauSampleDeltas = new ArrayList<Double>(repeatCount);

        trace("Declaring and purging queue " + q);
        chan.queueDeclare(q, true, false, false, null);
        chan.queuePurge(q);
        chan.basicQos(1);

        trace("Building backlog out to " + backlogSize + " messages, each " + bodySize + " bytes long");
        for (int i = 0; i < backlogSize; i++) {
            chan.basicPublish("", q, props, body);
        }
View Full Code Here

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

            chan.basicAck(d.getEnvelope().getDeliveryTag(), false);
        }
        System.out.println();

        trace("Switching QOS to unlimited");
        chan.basicQos(0);

        trace("Draining backlog");
        for (int i = 0; i < backlogSize; i++) {
            QueueingConsumer.Delivery d = consumer.nextDelivery();
            chan.basicAck(d.getEnvelope().getDeliveryTag(), false);
View Full Code Here

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

    public Consumer createConsumer(Connection connection, Stats stats, String id) throws IOException {
        Channel channel = connection.createChannel();
        if (consumerTxSize > 0) channel.txSelect();
        String qName = configureQueue(connection, id);
        if (consumerPrefetch > 0) channel.basicQos(consumerPrefetch);
        if (channelPrefetch > 0) channel.basicQos(channelPrefetch, true);
        return new Consumer(channel, id, qName,
                                         consumerTxSize, autoAck, multiAckEvery,
                                         stats, consumerRateLimit, consumerMsgCount, timeLimit);
    }
View Full Code Here

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

    public Consumer createConsumer(Connection connection, Stats stats, String id) throws IOException {
        Channel channel = connection.createChannel();
        if (consumerTxSize > 0) channel.txSelect();
        String qName = configureQueue(connection, id);
        if (consumerPrefetch > 0) channel.basicQos(consumerPrefetch);
        if (channelPrefetch > 0) channel.basicQos(channelPrefetch, true);
        return new Consumer(channel, id, qName,
                                         consumerTxSize, autoAck, multiAckEvery,
                                         stats, consumerRateLimit, consumerMsgCount, timeLimit);
    }
View Full Code Here

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

        String q1 = declareBindConsume(ch1, c1, false);
        String q2 = declareBindConsume(ch2, c2, false);
        ch1.basicConsume(q2, false, c1);
        ch2.basicConsume(q1, false, c2);
        ch1.basicQos(1, true);
        ch2.basicQos(1, true);
        fill(5);
        List<Delivery> d1 = drain(c1, 1);
        List<Delivery> d2 = drain(c2, 1);
        ackDelivery(ch1, d1.remove(0), true);
        ackDelivery(ch2, d2.remove(0), true);
View Full Code Here

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

    Channel channel = this.createChannel();

    // Basic Qos
    if (RabbitMQPlugin.isBasicQos()) {
      int prefetchCount = 1;
      channel.basicQos(prefetchCount);
    }

    // Start Daemon
    while (true) {
      // Add to the number of retries
View Full Code Here

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

    Channel channel = this.createChannel();

    // Basic Qos
    if (RabbitMQPlugin.isBasicQos()) {
      int prefetchCount = 1;
      channel.basicQos(prefetchCount);
    }

    // Start Daemon
    while (true) {
      // Add to the number of retries
View Full Code Here

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

    Channel channel = this.createChannel();

    // Basic Qos
    if (RabbitMQPlugin.isBasicQos()) {
      int prefetchCount = 1;
      channel.basicQos(prefetchCount);
    }

    // Start Daemon
    while (true) {
      // Add to the number of retries
View Full Code Here

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

    try {
      if (this.connected) {
        channel = this.connection.createChannel ();
        channel.setDefaultConsumer (null);
        channel.addReturnListener (this.returnCallback);
        channel.basicQos (1);
        this.channels.put (clientId, channel);
      }
    } catch (final IOException e) {
      this.exceptions.traceIgnoredException (e);
    }
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.