Commit 45e839fd authored by xiaoguang.xu's avatar xiaoguang.xu

pom version

parent 13051af9
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.2.2</version>
<version>0.2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -9,12 +9,6 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
* create on 2018.04.27
*/
public interface ITechRabbitBuilder {
/**
* 设定Mq的名称
* @param remoteServiceName
* @return
*/
ITechRabbitBuilder remoteServiceName(String remoteServiceName);
/**
* 构建RabbitTemplate
......@@ -23,9 +17,6 @@ public interface ITechRabbitBuilder {
*/
RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory);
@Deprecated
RabbitTemplate crateRabbitTemplate(ConnectionFactory connectionFactory);
/**
* 构建SimpleRabbitListenerContainerFactory
* @param connectionFactory
......
......@@ -12,16 +12,6 @@ public class TechRabbitBuilderNoTrace implements ITechRabbitBuilder {
public TechRabbitBuilderNoTrace() {
}
@Override
public ITechRabbitBuilder remoteServiceName(String remoteServiceName) {
return this;
}
@Override
public RabbitTemplate crateRabbitTemplate(ConnectionFactory connectionFactory) {
return createRabbitTemplate(connectionFactory);
}
@Override
public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory) {
return new RabbitTemplate(connectionFactory);
......
......@@ -13,28 +13,21 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
public class TechRabbitBuilderTrace implements ITechRabbitBuilder {
private SpringRabbitTracing.Builder springRabbitTracingBuilder;
public TechRabbitBuilderTrace(Tracing tracing){
public TechRabbitBuilderTrace(Tracing tracing) {
springRabbitTracingBuilder = SpringRabbitTracing.newBuilder(tracing);
}
@Override
public ITechRabbitBuilder remoteServiceName(String remoteServiceName) {
springRabbitTracingBuilder.remoteServiceName(remoteServiceName);
return this;
}
@Override
public RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory) {
return springRabbitTracingBuilder.build().newRabbitTemplate(connectionFactory);
}
@Override
public RabbitTemplate crateRabbitTemplate(ConnectionFactory connectionFactory) {
return createRabbitTemplate(connectionFactory);
String virtualHost = connectionFactory.getVirtualHost();
SpringRabbitTracing.Builder builder = springRabbitTracingBuilder.remoteServiceName("MQ-" + virtualHost);
return builder.build().newRabbitTemplate(connectionFactory);
}
@Override
public SimpleRabbitListenerContainerFactory createSimpleRabbitListenerContainerFactory(ConnectionFactory connectionFactory) {
return springRabbitTracingBuilder.build().newSimpleRabbitListenerContainerFactory(connectionFactory);
String virtualHost = connectionFactory.getVirtualHost();
SpringRabbitTracing.Builder builder = springRabbitTracingBuilder.remoteServiceName("MQ-" + virtualHost);
return builder.build().newSimpleRabbitListenerContainerFactory(connectionFactory);
}
}
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.2.2</version>
<version>0.2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.2.2</version>
<version>0.2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.2.2</version>
<version>0.2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cn.quantgroup</groupId>
<artifactId>commons-parent</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
......@@ -33,7 +33,7 @@
<lombok.version>1.16.20</lombok.version>
<guava.version>23.0</guava.version>
<apollo.client.version>0.10.2</apollo.client.version>
<common.parent.version>0.2.2</common.parent.version>
<common.parent.version>0.2.3</common.parent.version>
</properties>
<dependencies>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>commons-parent</artifactId>
<groupId>cn.quantgroup</groupId>
<version>0.2.2</version>
<version>0.2.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment