Examples of DirectExchange


Examples of org.springframework.amqp.core.DirectExchange

  private void declarePipelineCreationQueue(RabbitAdmin admin) {

    Queue queue = new Queue(PIPELINE_CREATION_QUEUE, true, false, false);
    admin.declareQueue(queue);

    DirectExchange exchange = new DirectExchange(PIPELINE_CREATION_QUEUE,
        true, false);

    admin.declareExchange(exchange);

    admin.declareBinding(BindingBuilder.bind(queue).to(exchange).with(""));
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

  public String declareEventsExchange(String pipeline) {

    String exchangeName = EVENT_QUEUE_PREFIX + pipeline;

    DirectExchange exchange = new DirectExchange(exchangeName, false, true);
    admin.declareExchange(exchange);

    log.debug("Events exchange '" + exchangeName + "' declared.");

    return exchangeName;
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

  public void bindExchangeToQueue(String exchangeId, String queueId,
      String eventRoutingKey) {

    Queue queue = new Queue(queueId, false, true, true);
    DirectExchange exchange = new DirectExchange(exchangeId);

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

    log.debug("Exchange '" + exchangeId + "' bind to queue '" + queueId
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

      String prefix = properties.getPrefix(this.defaultPrefix);
      String dlqName = prefix + name + ".dlq";
      Queue dlq = new Queue(dlqName);
      declareQueueIfNotPresent(dlq);
      final String dlxName = properties.getPrefix(this.defaultPrefix) + "DLX";
      final DirectExchange dlx = new DirectExchange(dlxName);
      declareExchangeIfNotPresent(dlx);
      this.rabbitAdmin.declareBinding(BindingBuilder.bind(dlq).to(dlx).with(prefix + name));
    }
  }
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

        return builder.toString();       
    }
   
    org.springframework.amqp.core.Exchange createAMQPExchange() {
        if("direct".equals(this.exchangeType)) {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        } 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.DirectExchange

        return builder.toString();       
    }
   
    org.springframework.amqp.core.Exchange createAMQPExchange() {
        if("direct".equals(this.exchangeType)) {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        } 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.DirectExchange

        return builder.toString();       
    }
   
    org.springframework.amqp.core.Exchange createAMQPExchange() {
        if("direct".equals(this.exchangeType)) {
            return new DirectExchange(this.exchangeName, this.durable, this.autodelete);
        } 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.DirectExchange

    return new Queue(QueueNames.RESULT_QUEUE_NAME);
  }
 
  @Bean
  public DirectExchange piExchange() {
    return new DirectExchange("piExchange");
  }
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

    return new Queue(QueueNames.RESULT_QUEUE_NAME);
  }
 
  @Bean
  public DirectExchange piExchange() {
    return new DirectExchange("piExchange");
  }
View Full Code Here

Examples of org.springframework.amqp.core.DirectExchange

        name = params.get(NAME).toString();
      }
      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 {
          exchange = new CustomExchange(name, type, durable, autoDelete, arguments);
        }
        currentExchange = exchange;

      } else {
        currentExchange = new DirectExchange(name);
      }
      try {
        rabbitAdmin.declareExchange(currentExchange);
      } catch (Exception e) {
        log.error(e.getMessage(), e);
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.