Package org.springframework.amqp.core

Examples of org.springframework.amqp.core.FanoutExchange


  @Test
  public void testSendAndReceiveWithFanout() throws Exception {

    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    FanoutExchange exchange = new FanoutExchange("fanout");
    admin.declareExchange(exchange);
    template.setExchange(exchange.getName());

    admin.declareBinding(BindingBuilder.bind(queue).to(exchange));

    template.execute(new ChannelCallback<Void>() {
      @Override
View Full Code Here


      }
      else if ("direct".equals(exchangeType)) {
        x = new DirectExchange(exchangeName, durable, autoDelete);
      }
      else if ("fanout".equals(exchangeType)) {
        x = new FanoutExchange(exchangeName, durable, autoDelete);
      }
      else if ("headers".equals(exchangeType)) {
        x = new HeadersExchange(exchangeType, durable, autoDelete);
      }
      else {
View Full Code Here

      }
      else if ("direct".equals(this.exchangeType)) {
        x = new DirectExchange(this.exchangeName, this.durable, this.autoDelete);
      }
      else if ("fanout".equals(this.exchangeType)) {
        x = new FanoutExchange(this.exchangeName, this.durable, this.autoDelete);
      }
      else if ("headers".equals(this.exchangeType)) {
        x = new HeadersExchange(this.exchangeType, this.durable, this.autoDelete);
      }
      else {
View Full Code Here

  }

  @Test
  public void testFanoutExchange() throws Exception {
    FanoutExchange exchange = beanFactory.getBean("fanout", FanoutExchange.class);
    assertNotNull(exchange);
    assertEquals("fanout", exchange.getName());
    assertTrue(exchange.isDurable());
    assertFalse(exchange.isAutoDelete());
    assertTrue(exchange.shouldDeclare());
    assertEquals(1, exchange.getDeclaringAdmins().size());

  }
View Full Code Here

TOP

Related Classes of org.springframework.amqp.core.FanoutExchange

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.