AMQP-9 removed 'default' from names of template properties
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user