|
|
|
@ -25,7 +25,6 @@ import org.springframework.amqp.core.BindingBuilder;
@@ -25,7 +25,6 @@ import org.springframework.amqp.core.BindingBuilder;
|
|
|
|
|
import org.springframework.amqp.core.DirectExchange; |
|
|
|
|
import org.springframework.amqp.core.Queue; |
|
|
|
|
import org.springframework.amqp.rabbit.connection.ConnectionFactory; |
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|
|
|
|
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
|
|
|
@ -70,18 +69,6 @@ public class TurbineAmqpAutoConfiguration {
@@ -70,18 +69,6 @@ public class TurbineAmqpAutoConfiguration {
|
|
|
|
|
@Autowired(required = false) |
|
|
|
|
private ObjectMapper objectMapper; |
|
|
|
|
|
|
|
|
|
private RabbitTemplate amqpTemplate; |
|
|
|
|
|
|
|
|
|
public RabbitTemplate amqpTemplate() { |
|
|
|
|
if (this.amqpTemplate == null) { |
|
|
|
|
RabbitTemplate amqpTemplate = new RabbitTemplate(connectionFactory()); |
|
|
|
|
Jackson2JsonMessageConverter converter = messageConverter(); |
|
|
|
|
amqpTemplate.setMessageConverter(converter); |
|
|
|
|
this.amqpTemplate = amqpTemplate; |
|
|
|
|
} |
|
|
|
|
return this.amqpTemplate; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
public DirectExchange hystrixStreamExchange() { |
|
|
|
|
DirectExchange exchange = new DirectExchange(HystrixConstants.HYSTRIX_STREAM_NAME); |
|
|
|
|