Examples of confirmSelect()


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

        throws IOException
    {
        channel.confirmSelect();
        try {
            Channel ch = connection.createChannel();
            ch.confirmSelect();
            ch.txSelect();
            fail();
        } catch (IOException ioe) {
            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
View Full Code Here

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

            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
        try {
            Channel ch = connection.createChannel();
            ch.txSelect();
            ch.confirmSelect();
            fail();
        } catch (IOException ioe) {
            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
    }
View Full Code Here

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

                Connection conn = factory.newConnection();
                producerConnections[i] = conn;
                Channel channel = conn.createChannel();
                producerChannels[i] = channel;
                if (producerTxSize > 0) channel.txSelect();
                if (confirm >= 0) channel.confirmSelect();
                channel.exchangeDeclare(exchangeName, exchangeType);
                final Producer p = new Producer(channel, exchangeName, id,
                                                flags, producerTxSize,
                                                rateLimit, minMsgSize, timeLimit,
                                                confirm, stats);
View Full Code Here

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

                // Setup
                Connection conn = connectionFactory.newConnection();
                Channel ch = conn.createChannel();
                ch.queueDeclare(QUEUE_NAME, true, false, false, null);
                ch.confirmSelect();

                // Publish
                for (long i = 0; i < msgCount; ++i) {
                    ch.basicPublish("", QUEUE_NAME,
                                    MessageProperties.PERSISTENT_BASIC,
View Full Code Here

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

        throws IOException
    {
        channel.confirmSelect();
        try {
            Channel ch = connection.createChannel();
            ch.confirmSelect();
            ch.txSelect();
            fail();
        } catch (IOException ioe) {
            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
View Full Code Here

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

            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
        try {
            Channel ch = connection.createChannel();
            ch.txSelect();
            ch.confirmSelect();
            fail();
        } catch (IOException ioe) {
            checkShutdownSignal(AMQP.PRECONDITION_FAILED, ioe);
        }
    }
View Full Code Here

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

    }

    public Producer createProducer(Connection connection, Stats stats, String id) throws IOException {
        Channel channel = connection.createChannel();
        if (producerTxSize > 0) channel.txSelect();
        if (confirm >= 0) channel.confirmSelect();
        if (!predeclared || !exchangeExists(connection, exchangeName)) {
            channel.exchangeDeclare(exchangeName, exchangeType);
        }
        final Producer producer = new Producer(channel, exchangeName, id,
                                               randomRoutingKey, flags, producerTxSize,
View Full Code Here

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

                // Setup
                Connection conn = connectionFactory.newConnection();
                Channel ch = conn.createChannel();
                ch.queueDeclare(QUEUE_NAME, true, false, false, null);
                ch.confirmSelect();

                // Publish
                for (long i = 0; i < msgCount; ++i) {
                    ch.basicPublish("", QUEUE_NAME,
                                    MessageProperties.PERSISTENT_BASIC,
View Full Code Here

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

        execute("Transactional, new Channel per tx", createChannelCreatingThreads(connection, queueName, true));
        queueName = refreshQueue(channel, queueName);
        execute("Non-transactional, new Channel per tx", createChannelCreatingThreads(connection, queueName, false));
        queueName = refreshQueue(channel, queueName);
        execute("Non-transactional, single Channel", createChannelSharingThreads(connection, queueName));
        channel.confirmSelect();
        connection.close();
    }

    private static List<Thread> createChannelCreatingThreads(final Connection connection, final String queueName,
                                                             final boolean transactional) {
View Full Code Here

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

        brokerAssert.queueNotEmtpy(TestBrokerSetup.TEST_QUEUE_DEAD);
    }
   
    private void sendTestMessage() throws IOException, InterruptedException {
        Channel producerChannel = connectionFactory.newConnection().createChannel();
        producerChannel.confirmSelect();
        producerChannel.basicPublish("", TestBrokerSetup.TEST_QUEUE, new BasicProperties.Builder().build(), "test".getBytes("UTF-8"));
        producerChannel.waitForConfirmsOrDie();
        brokerAssert.queueNotEmtpy(TestBrokerSetup.TEST_QUEUE);
    }
   
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.