Examples of TopicExchange


Examples of org.springframework.amqp.core.TopicExchange

   */
  public void createQueue() {
    RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    Queue sourceQueue = new Queue(queue, false, false, true);
    admin.declareQueue(sourceQueue);
    TopicExchange exchange = new TopicExchange(DEFAULT_EXCHANGE);
    admin.declareExchange(exchange);
    admin.declareBinding(
        BindingBuilder.bind(sourceQueue).to(exchange).with("rabbitfixture.*"));
  }
 
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

        } else if("fanout".equals(this.exchangeType)) {
            return new FanoutExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("headers".equals(this.exchangeType)) {
            return new HeadersExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("topic".equals(this.exchangeType)) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        //We have a routing key but no explicit exchange type, assume topic exchange
        } else if(this.routingKey != null) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        } else {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        }
    }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

        } else if("fanout".equals(this.exchangeType)) {
            return new FanoutExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("headers".equals(this.exchangeType)) {
            return new HeadersExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("topic".equals(this.exchangeType)) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        //We have a routing key but no explicit exchange type, assume topic exchange
        } else if(this.routingKey != null) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        } else {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        }
    }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

        } else if("fanout".equals(this.exchangeType)) {
            return new FanoutExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("headers".equals(this.exchangeType)) {
            return new HeadersExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("topic".equals(this.exchangeType)) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        //We have a routing key but no explicit exchange type, assume topic exchange
        } else if(this.routingKey != null) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        } else {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        }
    }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

    return new JsonMessageConverter();
  }
 
  @Bean
  public TopicExchange marketDataExchange() {
    return new TopicExchange(MARKET_DATA_EXCHANGE_NAME);
  }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

      if (params.containsKey(TYPE)) {
        String type = params.containsKey(TYPE) ? params.get(TYPE).toString() : DIRECT;
        if (DIRECT.equals(type)) {
          exchange = new DirectExchange(name, durable, autoDelete, arguments);
        } else if (TOPIC.equals(type)) {
          exchange = new TopicExchange(name, durable, autoDelete, arguments);
        } else if (FANOUT.equals(type)) {
          exchange = new FanoutExchange(name, durable, autoDelete, arguments);
        } else if (HEADERS.equals(type)) {
          exchange = new HeadersExchange(name, durable, autoDelete, arguments);
        } else {
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

        } else if("fanout".equals(this.exchangeType)) {
            return new FanoutExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("headers".equals(this.exchangeType)) {
            return new HeadersExchange(this.exchangeName, this.durable, this.autodelete);
        } else if("topic".equals(this.exchangeType)) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        //We have a routing key but no explicit exchange type, assume topic exchange
        } else if(this.routingKey != null) {
            return new TopicExchange(this.exchangeName, this.durable, this.autodelete);
        } else {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        }
    }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

    return new SingleConnectionFactory("localhost");
  }

  @Bean
  public TopicExchange testExchange() {
    return new TopicExchange(EXCHANGE, true, false);
  }
View Full Code Here

Examples of org.springframework.amqp.core.TopicExchange

  @Test
  public void testSendAndReceiveWithTopicSingleCallback() throws Exception {

    final RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    final TopicExchange exchange = new TopicExchange("topic");
    admin.declareExchange(exchange);
    template.setExchange(exchange.getName());

    admin.declareBinding(BindingBuilder.bind(queue).to(exchange).with("*.end"));

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

Examples of org.springframework.amqp.core.TopicExchange

  @Test
  public void testSendAndReceiveWithNonDefaultExchange() throws Exception {

    final RabbitAdmin admin = new RabbitAdmin(connectionFactory);
    final TopicExchange exchange = new TopicExchange("topic");
    admin.declareExchange(exchange);

    admin.declareBinding(BindingBuilder.bind(queue).to(exchange).with("*.end"));

    template.execute(new ChannelCallback<Void>() {
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.