Package org.springframework.amqp.core

Examples of org.springframework.amqp.core.Queue


    connectionFactory.setPassword(svc_passwd);
    connectionFactory.setVirtualHost(svc_vhost);

    String queueName = "CLOUD";
    AmqpAdmin amqpAdmin = new RabbitAdmin(connectionFactory);
    Queue cloudQueue = new Queue(queueName);
    amqpAdmin.declareQueue(cloudQueue);

    RabbitTemplate template = new RabbitTemplate(connectionFactory);
    template.setRoutingKey(queueName);
    template.setQueue(queueName);
View Full Code Here


  }

  @Bean
  // Every queue is bound to the default direct exchange
  public Queue helloWorldQueue() {
    return new Queue(this.helloWorldQueueName);
  }
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

   * An example application that only configures the AMQP broker
   */
  public static void main(String[] args) throws Exception {
    ApplicationContext context = new ClassPathXmlApplicationContext("rabbitConfiguration.xml");
    AmqpAdmin amqpAdmin = context.getBean(AmqpAdmin.class);
    Queue helloWorldQueue = new Queue("hello.world.queue");
   
    amqpAdmin.declareQueue(helloWorldQueue);

  }
View Full Code Here

    return rabbitAdmin;
  }

  @Bean
  public Queue queue() {
    return new Queue(LOG_QUEUE_NAME);
  }
View Full Code Here

        Map<String, Object> queueArguments = new HashMap<String, Object>();
        if(endpoint.getTimeToLive() != null)
            queueArguments.put(TTL_QUEUE_ARGUMENT, endpoint.getTimeToLive());
       
        //Declare queue
        this.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 {}", this.queue.getName());
       
        //Is this a header exchange? Bind the key/value pair(s)
        if(exchange instanceof HeadersExchange) {
View Full Code Here

        Map<String, Object> queueArguments = new HashMap<String, Object>();
        if(endpoint.getTimeToLive() != null)
            queueArguments.put(TTL_QUEUE_ARGUMENT, endpoint.getTimeToLive());
       
        //Declare queue
        this.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 {}", this.queue.getName());
       
        //Is this a header exchange? Bind the key/value pair(s)
        if(exchange instanceof HeadersExchange) {
View Full Code Here

        Map<String, Object> queueArguments = new HashMap<String, Object>();
        if(endpoint.getTimeToLive() != null)
            queueArguments.put(TTL_QUEUE_ARGUMENT, endpoint.getTimeToLive());
       
        //Declare queue
        this.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 {}", this.queue.getName());
       
        //Is this a header exchange? Bind the key/value pair(s)
        if(exchange instanceof HeadersExchange) {
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

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.