Package com.rabbitmq.client

Examples of com.rabbitmq.client.Envelope


    container.setShutdownTimeout(100);
    container.setTransactionManager(new DummyTxManager());
    container.afterPropertiesSet();
    container.start();

    consumer.get().handleDelivery("qux", new Envelope(1, false, "foo", "bar"), new BasicProperties(), new byte[] {0});

    assertTrue(latch.await(10, TimeUnit.SECONDS));

    Exception e = tooManyChannels.get();
    if (e != null) {
View Full Code Here


    container.setShutdownTimeout(100);
    container.setTransactionManager(new DummyTxManager());
    container.afterPropertiesSet();
    container.start();

    consumer.get().handleDelivery("qux", new Envelope(1, false, "foo", "bar"), new BasicProperties(), new byte[] {0});

    assertTrue(latch.await(10, TimeUnit.SECONDS));

    Exception e = tooManyChannels.get();
    if (e != null) {
View Full Code Here

    container.setShutdownTimeout(100);
    container.setTransactionManager(new DummyTxManager());
    container.afterPropertiesSet();
    container.start();

    consumer.get().handleDelivery("qux", new Envelope(1, false, "foo", "bar"), new BasicProperties(), new byte[] {0});

    assertTrue(latch.await(10, TimeUnit.SECONDS));

    Exception e = tooManyChannels.get();
    if (e != null) {
View Full Code Here

    container.setShutdownTimeout(100);
    container.setTransactionManager(new RabbitTransactionManager(cachingConnectionFactory));
    container.afterPropertiesSet();
    container.start();

    consumer.get().handleDelivery("qux", new Envelope(1, false, "foo", "bar"), new BasicProperties(), new byte[] {0});

    assertTrue(latch.await(10, TimeUnit.SECONDS));

    Exception e = tooManyChannels.get();
    if (e != null) {
View Full Code Here

    }
    if (delivery == null) {
      return null;
    }
    byte[] body = delivery.getBody();
    Envelope envelope = delivery.getEnvelope();

    MessageProperties messageProperties = this.messagePropertiesConverter.toMessageProperties(
        delivery.getProperties(), envelope, "UTF-8");
    messageProperties.setMessageCount(0);
    Message message = new Message(body, messageProperties);
View Full Code Here

        Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.anyMap(), Mockito.any(Consumer.class));
    RabbitTemplate template = new RabbitTemplate(new SingleConnectionFactory(mockConnectionFactory));
    template.setReplyTimeout(1);
    Message input = new Message("Hello, world!".getBytes(), new MessageProperties());
    template.doSendAndReceiveWithTemporary("foo", "bar", input);
    Envelope envelope = new Envelope(1, false, "foo", "bar");
    // used to hang here because of the SynchronousQueue and doSendAndReceive() already exited
    consumer.get().handleDelivery("foo", envelope, new AMQP.BasicProperties(), new byte[0]);
  }
View Full Code Here

TOP

Related Classes of com.rabbitmq.client.Envelope

Copyright © 2018 www.massapicom. 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.