Package org.springframework.amqp.rabbit.core

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


    assertEquals("message", result);

    // The channel is not transactional
    exception.expect(AmqpIOException.class);

    template2.execute(new ChannelCallback<Void>() {
      @Override
      public Void doInRabbit(Channel channel) throws Exception {
        // Should be an exception because the channel is not transactional
        channel.txRollback();
        return null;
View Full Code Here


    admin.declareQueue(queue);
    final String route = queue.getName();

    final CountDownLatch latch = new CountDownLatch(1);
    try {
      template.execute(new ChannelCallback<Object>() {
        @Override
        public Object doInRabbit(Channel channel) throws Exception {
          channel.getConnection().addShutdownListener(new ShutdownListener() {
            @Override
            public void shutdownCompleted(ShutdownSignalException cause) {
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.