Package org.springframework.amqp.core

Examples of org.springframework.amqp.core.Queue


  /**
   * Creates an instance of the queue on the rabbit broker. If already present then no action is taken.
   */
  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


  public void testDefaultOptions() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);

    String streamName = generateStreamName();
    Queue queue = new Queue(streamName);
    rabbitAdmin.declareQueue(queue);
    queues.add(streamName);


    stream().create(streamName, "%s | rabbit", httpSource);
View Full Code Here

  @Autowired
  private AmqpAdmin amqpAdmin;

  @PostConstruct
  public void setUpQueue() {
    this.amqpAdmin.declareQueue(new Queue("foo"));
  }
View Full Code Here

            } while (error);
        }

        protected void declareAMQPEntities() {
            org.springframework.amqp.core.Exchange exchange = declareExchange();
            Queue queue = declareQueue();
            declareBinding(exchange, queue);
        }
View Full Code Here

                queueArguments.put(TTL_QUEUE_ARGUMENT, endpoint.getTimeToLive());
            if(endpoint.isHa() )
                queueArguments.put(HA_POLICY_ARGUMENT, "all");

            //Declare queue
            Queue queue = new Queue(this.endpoint.queueName, this.endpoint.durable, this.endpoint.exclusive, this.endpoint.autodelete, queueArguments);
            this.endpoint.getAmqpAdministration().declareQueue(queue);
            LOG.info("Declared queue {} for endpoint {}.", queue.getName(), endpoint);
            return queue;
        }
View Full Code Here

            } while (error);
        }

        protected void declareAMQPEntities() {
            org.springframework.amqp.core.Exchange exchange = declareExchange();
            Queue queue = declareQueue();
            declareBinding(exchange, queue);
        }
View Full Code Here

                queueArguments.put(TTL_QUEUE_ARGUMENT, endpoint.getTimeToLive());
            if(endpoint.isHa() )
                queueArguments.put(HA_POLICY_ARGUMENT, "all");

            //Declare queue
            Queue queue = new Queue(this.endpoint.queueName, this.endpoint.durable, this.endpoint.exclusive, this.endpoint.autodelete, queueArguments);
            this.endpoint.getAmqpAdministration().declareQueue(queue);
            LOG.info("Declared queue {} for endpoint {}.", queue.getName(), endpoint);
            return queue;
        }
View Full Code Here

 
  @Bean
  public Queue workQueue() {
    // This queue will be declared due to the presence of the AmqpAdmin class in the context.
    // Every queue is bound to the default direct exchange   
    return new Queue(QueueNames.WORK_QUEUE_NAME);
  }
View Full Code Here

 
  @Bean
  public Queue resultQueue() {
    // This queue will be declared due to the presence of the AmqpAdmin class in the context.
    // Every queue is bound to the default direct exchange   
    return new Queue(QueueNames.RESULT_QUEUE_NAME);
  }
View Full Code Here

   * We don't need to define any binding for the stock request queue, since it's relying
   * on the default (no-name) direct exchange to which every queue is implicitly bound.
   */
  @Bean
  public Queue stockRequestQueue() {   
    return new Queue(STOCK_REQUEST_QUEUE_NAME)
  }
View Full Code Here

TOP

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

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.