Package org.springframework.amqp.rabbit.core

Examples of org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend()


      });
      fail("Expected AmqpIOException");
    } catch (AmqpIOException e) {
      // expected
    }
    template.convertAndSend(route, "message");
    assertTrue(latch.await(1000, TimeUnit.MILLISECONDS));
    String result = (String) template.receiveAndConvert(route);
    assertEquals("message", result);
    result = (String) template.receiveAndConvert(route);
    assertEquals(null, result);
View Full Code Here


    RabbitAdmin rabbitAdmin = new RabbitAdmin(template.getConnectionFactory());
    rabbitAdmin.deleteQueue(queue.getName());
    rabbitAdmin.declareQueue(queue);

    assertEquals(100L, queue.getArguments().get("x-message-ttl"));
    template.convertAndSend(queue.getName(), "message");

    Thread.sleep(200);
    String result = (String) template.receiveAndConvert(queue.getName());
    assertEquals(null, result);
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.