Package org.springframework.amqp.rabbit.core

Examples of org.springframework.amqp.rabbit.core.RabbitAdmin.declareExchange()


  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


    args.put("x-dead-letter-exchange", "test.DLE");
    Queue queue = new Queue("", false, false, true, args);
    String testQueueName = admin.declareQueue(queue);
    // Create a DeadLetterExchange and bind a queue to it with the original routing key
    DirectExchange dle = new DirectExchange("test.DLE", false, true);
    admin.declareExchange(dle);
    Queue dlq = new AnonymousQueue();
    admin.declareQueue(dlq);
    admin.declareBinding(BindingBuilder.bind(dlq).to(dle).with(testQueueName));

    container.setQueueNames(testQueueName);
View Full Code Here

      }
      else {
        x = new TopicExchange(exchangeName, durable, autoDelete);
      }
      // admin.deleteExchange(exchangeName);
      admin.declareExchange(x);
    }
  }

  @Override
  public void append(LoggingEvent event) {
View Full Code Here

        x = new HeadersExchange(this.exchangeType, this.durable, this.autoDelete);
      }
      else {
        x = new TopicExchange(this.exchangeName, this.durable, this.autoDelete);
      }
      admin.declareExchange(x);
    }
  }

  /**
   * Subclasses may modify the final message before sending.
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.