AMQP-9 removed 'default' from names of template properties

This commit is contained in:
Mark Fisher
2010-07-08 14:57:50 -07:00
committed by Dave Syer
parent bbfab5f8d8
commit 822317679a
3 changed files with 5 additions and 8 deletions

View File

@@ -28,13 +28,14 @@ public class RabbitConfiguration extends AbstractRabbitConfiguration {
public RabbitTemplate rabbitTemplate() {
RabbitTemplate template = new RabbitTemplate(connectionFactory());
//The routing key is set to the name of the queue by the broker for the default exchange.
template.setDefaultRoutingKey(helloWorldQueue.getName());
template.setRoutingKey(helloWorldQueue.getName());
//Where we will synchronously receive messages from
template.setDefaultReceiveQueue(helloWorldQueue);
template.setQueue(helloWorldQueue.getName());
return template;
}
@PostConstruct
@SuppressWarnings("unused")
private void configureBroker() {
declare(helloWorldQueue);
}

View File

@@ -16,13 +16,9 @@
package org.springframework.amqp.rabbit.stocks.config.client;
import javax.annotation.PostConstruct;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.UniquelyNamedQueue;
import static org.springframework.amqp.core.BindingBuilder.*;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
@@ -67,7 +63,7 @@ public class RabbitClientConfiguration extends AbstractStockAppRabbitConfigurati
*/
@Override
public void configureRabbitTemplate(RabbitTemplate rabbitTemplate) {
rabbitTemplate.setDefaultRoutingKey(STOCK_REQUEST_QUEUE_NAME);
rabbitTemplate.setRoutingKey(STOCK_REQUEST_QUEUE_NAME);
}
@Bean

View File

@@ -36,7 +36,7 @@ public class RabbitServerConfiguration extends AbstractStockAppRabbitConfigurati
* {@link AbstractStockAppRabbitConfiguration#MARKET_DATA_EXCHANGE_NAME}.
*/
public void configureRabbitTemplate(RabbitTemplate rabbitTemplate) {
rabbitTemplate.setDefaultExchange(MARKET_DATA_EXCHANGE_NAME);
rabbitTemplate.setExchange(MARKET_DATA_EXCHANGE_NAME);
}
/**