|
@ -4,6 +4,8 @@ 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.EndPointConstant;
|
|
|
import com.yihu.hos.web.framework.constant.MycatConstant;
|
|
|
import com.yihu.hos.web.framework.constant.SSHConstant;
|
|
|
import com.yihu.hos.web.framework.constant.ServiceFlowConstant;
|
|
|
import org.apache.camel.CamelContext;
|
|
|
import org.apache.camel.ProducerTemplate;
|
|
@ -94,7 +96,7 @@ public class ProxyService {
|
|
|
header.put("event", message.getHead("event"));
|
|
|
|
|
|
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
|
|
|
producerTemplate.sendBodyAndHeaders(ServiceFlowConstant.MYCAT_EVENT_SERVICE, message.getBodyString(), header);
|
|
|
producerTemplate.sendBodyAndHeaders(MycatConstant.CAMEL_ENDPOINT, message.getBodyString(), header);
|
|
|
}
|
|
|
|
|
|
public void start() {
|
|
@ -104,7 +106,7 @@ public class ProxyService {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
consumer = new Consumer(zbusBroker, ServiceFlowConstant.MYCAT_UPDATE + "@" + configuration.getMycatName());
|
|
|
consumer = new Consumer(zbusBroker, MycatConstant.ZBUS_MQ + "@" + configuration.getMycatName());
|
|
|
consumer.start(this::handle);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
@ -131,7 +133,7 @@ public class ProxyService {
|
|
|
header.put("event", message.getHead("event"));
|
|
|
|
|
|
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
|
|
|
producerTemplate.sendBodyAndHeaders(ServiceFlowConstant.SHELL_EVENT_SERVICE, message.getBodyString(), header);
|
|
|
producerTemplate.sendBodyAndHeaders(SSHConstant.CAMEL_ENDPOINT, message.getBodyString(), header);
|
|
|
}
|
|
|
|
|
|
public void start() {
|
|
@ -140,7 +142,7 @@ public class ProxyService {
|
|
|
return;
|
|
|
}
|
|
|
try {
|
|
|
consumer = new Consumer(zbusBroker, ServiceFlowConstant.SHELL_REQUEST + "@" + configuration.getTenant());
|
|
|
consumer = new Consumer(zbusBroker, SSHConstant.SHELL_REQUEST + "@" + configuration.getTenant());
|
|
|
consumer.start(this::handle);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
@ -166,7 +168,7 @@ public class ProxyService {
|
|
|
header.put("event", message.getHead("event"));
|
|
|
|
|
|
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
|
|
|
producerTemplate.sendBodyAndHeaders(ServiceFlowConstant.SHELL_EVENT_SERVICE, message.getBodyString(), header);
|
|
|
producerTemplate.sendBodyAndHeaders(SSHConstant.CAMEL_ENDPOINT, message.getBodyString(), header);
|
|
|
}
|
|
|
|
|
|
public void start() {
|