Parcourir la source

Merge branch 'master' of luofaqiang/esb into master

luofaqiang il y a 8 ans
Parent
commit
267bc4c643

+ 14 - 3
hos-arbiter/src/main/java/com/yihu/hos/arbiter/services/ProxyService.java

@ -1,5 +1,6 @@
package com.yihu.hos.arbiter.services;
import com.yihu.hos.arbiter.configuration.ArbiterServerConfiguration;
import com.yihu.hos.core.log.Logger;
import com.yihu.hos.core.log.LoggerFactory;
import com.yihu.hos.web.framework.constant.ServiceFlowConstant;
@ -22,9 +23,9 @@ import java.util.Map;
@Service
public class ProxyService {
    private static final Logger logger = LoggerFactory.getLogger(ProxyService.class);
    @Autowired
    private CamelContext camelContext;
    private CamelContext camelContext;
    private ArbiterServerConfiguration configuration;
    private ZbusBroker zbusBroker;
    private Consumer consumer;
@ -43,7 +44,7 @@ public class ProxyService {
            return;
        }
        consumer = new Consumer(zbusBroker, ServiceFlowConstant.SSH);
        consumer = new Consumer(zbusBroker, ServiceFlowConstant.SSH + "@" + configuration.getTenant());
        try {
            consumer.start(this::proxy);
        } catch (IOException e) {
@ -58,6 +59,16 @@ public class ProxyService {
        this.zbusBroker = zbusBroker;
    }
    @Autowired
    public void setCamelContext(CamelContext camelContext) {
        this.camelContext = camelContext;
    }
    @Autowired
    public void setConfiguration(ArbiterServerConfiguration configuration) {
        this.configuration = configuration;
    }
    @Override
    protected void finalize() throws Throwable {
        consumer.close();

+ 1 - 1
hos-arbiter/src/main/java/com/yihu/hos/arbiter/services/ServiceFlowService.java

@ -354,7 +354,7 @@ public class ServiceFlowService {
        }
        try {
            Producer producer = new Producer(zbusBroker, ServiceFlowConstant.SSH);
            Producer producer = new Producer(zbusBroker, ServiceFlowConstant.SSH + "@" + header.get("tenant"));
            producer.createMQ();    //确定为创建消息队列需要显示调用
            Message message = new Message();
            message.setHead(header);