Package org.springframework.amqp.rabbit.core

Examples of org.springframework.amqp.rabbit.core.RabbitMessagingTemplate


  @ConditionalOnMissingBean(RabbitMessagingTemplate.class)
  protected static class MessagingTemplateConfiguration {

    @Bean
    public RabbitMessagingTemplate rabbitMessagingTemplate(RabbitTemplate rabbitTemplate) {
      return new RabbitMessagingTemplate(rabbitTemplate);
    }
View Full Code Here


  @Test
  public void testDefaultRabbitConfiguration() {
    load(TestConfiguration.class);
    RabbitTemplate rabbitTemplate = this.context.getBean(RabbitTemplate.class);
    RabbitMessagingTemplate messagingTemplate = this.context
        .getBean(RabbitMessagingTemplate.class);
    CachingConnectionFactory connectionFactory = this.context
        .getBean(CachingConnectionFactory.class);
    RabbitAdmin amqpAdmin = this.context.getBean(RabbitAdmin.class);
    assertEquals(connectionFactory, rabbitTemplate.getConnectionFactory());
    assertEquals(rabbitTemplate, messagingTemplate.getRabbitTemplate());
    assertNotNull(amqpAdmin);
    assertEquals("localhost", connectionFactory.getHost());
    assertTrue("Listener container factory should be created by default",
        this.context.containsBean("rabbitListenerContainerFactory"));
  }
View Full Code Here

  }

  @Test
  public void testRabbitMessagingTemplateBackOff() {
    load(TestConfiguration4.class);
    RabbitMessagingTemplate messagingTemplate = this.context
        .getBean(RabbitMessagingTemplate.class);
    assertEquals("fooBar", messagingTemplate.getDefaultDestination());
  }
View Full Code Here

  @Configuration
  protected static class TestConfiguration4 {

    @Bean
    RabbitMessagingTemplate messagingTemplate(RabbitTemplate rabbitTemplate) {
      RabbitMessagingTemplate messagingTemplate = new RabbitMessagingTemplate(
          rabbitTemplate);
      messagingTemplate.setDefaultDestination("fooBar");
      return messagingTemplate;
    }
View Full Code Here

TOP

Related Classes of org.springframework.amqp.rabbit.core.RabbitMessagingTemplate

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.