Upgrade to Spring-AMQP 2.2.0.M2
This commit is contained in:
@@ -21,7 +21,7 @@ public class HelloWorldConfiguration {
|
||||
connectionFactory.setPassword("guest");
|
||||
return connectionFactory;
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public AmqpAdmin amqpAdmin() {
|
||||
return new RabbitAdmin(connectionFactory());
|
||||
@@ -33,7 +33,7 @@ public class HelloWorldConfiguration {
|
||||
//The routing key is set to the name of the queue by the broker for the default exchange.
|
||||
template.setRoutingKey(this.helloWorldQueueName);
|
||||
//Where we will synchronously receive messages from
|
||||
template.setQueue(this.helloWorldQueueName);
|
||||
template.setDefaultReceiveQueue(this.helloWorldQueueName);
|
||||
return template;
|
||||
}
|
||||
|
||||
@@ -44,37 +44,37 @@ public class HelloWorldConfiguration {
|
||||
}
|
||||
|
||||
/*
|
||||
@Bean
|
||||
@Bean
|
||||
public Binding binding() {
|
||||
return declare(new Binding(helloWorldQueue(), defaultDirectExchange()));
|
||||
}*/
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
@Bean
|
||||
public TopicExchange helloExchange() {
|
||||
return declare(new TopicExchange("hello.world.exchange"));
|
||||
}*/
|
||||
|
||||
|
||||
/*
|
||||
public Queue declareUniqueQueue(String namePrefix) {
|
||||
Queue queue = new Queue(namePrefix + "-" + UUID.randomUUID());
|
||||
rabbitAdminTemplate().declareQueue(queue);
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
||||
// if the default exchange isn't configured to your liking....
|
||||
@Bean Binding declareP2PBinding(Queue queue, DirectExchange exchange) {
|
||||
return declare(new Binding(queue, exchange, queue.getName()));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(String queuePrefix, FanoutExchange exchange) {
|
||||
return declare(new Binding(declareUniqueQueue(queuePrefix), exchange));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(UniqueQueue uniqueQueue, TopicExchange exchange) {
|
||||
return declare(new Binding(uniqueQueue, exchange));
|
||||
}
|
||||
|
||||
|
||||
@Bean Binding declarePubSubBinding(String queuePrefix, TopicExchange exchange, String routingKey) {
|
||||
return declare(new Binding(declareUniqueQueue(queuePrefix), exchange, routingKey));
|
||||
}*/
|
||||
|
||||
Reference in New Issue
Block a user