Examples of waitForConfirmsOrDie()


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

                    ch.basicPublish("", QUEUE_NAME,
                                    MessageProperties.PERSISTENT_BASIC,
                                    "nop".getBytes());
                }

                ch.waitForConfirmsOrDie();

                // Cleanup
                ch.queueDelete(QUEUE_NAME);
                ch.close();
                conn.close();
View Full Code Here

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

                    ch.basicPublish("", QUEUE_NAME,
                                    MessageProperties.PERSISTENT_BASIC,
                                    "nop".getBytes());
                }

                ch.waitForConfirmsOrDie();

                // Cleanup
                ch.queueDelete(QUEUE_NAME);
                ch.close();
                conn.close();
View Full Code Here

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

   
    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);
    }
   
    private class NackingConsumer extends MessageConsumer {
        boolean called = false;
View Full Code Here

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

            try {
                Channel channel = provideChannel();
                message.publish(channel, deliveryOptions);
                LOGGER.info("Waiting for publisher ack");
                channel.waitForConfirmsOrDie();
                LOGGER.info("Received publisher ack");
                return;
            } catch (IOException e) {
                handleIoException(attempt, e);
            } catch (InterruptedException e) {
View Full Code Here

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

            if (CurrentUnitOfWork.isStarted()) {
                CurrentUnitOfWork.get().registerListener(new ChannelTransactionUnitOfWorkListener(channel));
            } else if (isTransactional) {
                channel.txCommit();
            } else if (waitForAck) {
                channel.waitForConfirmsOrDie();
            }
        } catch (IOException e) {
            if (isTransactional) {
                tryRollback(channel);
            }
View Full Code Here

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

            @Override
            public void run() {
              try {
                if (CachingConnectionFactory.this.publisherConfirms) {
                  channel.waitForConfirmsOrDie(5000);
                }
                else {
                  Thread.sleep(5000);
                }
              }
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.