use of org.apache.eventmesh.runtime.core.plugin.MQProducerWrapper in project incubator-eventmesh by apache.
the class EventMeshProducer method init.
public synchronized void init(EventMeshHTTPConfiguration eventMeshHttpConfiguration, ProducerGroupConf producerGroupConfig) throws Exception {
this.producerGroupConfig = producerGroupConfig;
this.eventMeshHttpConfiguration = eventMeshHttpConfiguration;
Properties keyValue = new Properties();
keyValue.put("producerGroup", producerGroupConfig.getGroupName());
keyValue.put("instanceName", EventMeshUtil.buildMeshClientID(producerGroupConfig.getGroupName(), eventMeshHttpConfiguration.eventMeshCluster));
// TODO for defibus
keyValue.put("eventMeshIDC", eventMeshHttpConfiguration.eventMeshIDC);
mqProducerWrapper = new MQProducerWrapper(eventMeshHttpConfiguration.eventMeshConnectorPluginType);
mqProducerWrapper.init(keyValue);
inited.compareAndSet(false, true);
logger.info("EventMeshProducer [{}] inited.............", producerGroupConfig.getGroupName());
}
use of org.apache.eventmesh.runtime.core.plugin.MQProducerWrapper in project incubator-eventmesh by apache.
the class EventMeshProducer method init.
public synchronized void init(EventMeshGrpcConfiguration eventMeshGrpcConfiguration, ProducerGroupConf producerGroupConfig) throws Exception {
this.producerGroupConfig = producerGroupConfig;
Properties keyValue = new Properties();
keyValue.put("producerGroup", producerGroupConfig.getGroupName());
keyValue.put("instanceName", EventMeshUtil.buildMeshClientID(producerGroupConfig.getGroupName(), eventMeshGrpcConfiguration.eventMeshCluster));
// TODO for defibus
keyValue.put("eventMeshIDC", eventMeshGrpcConfiguration.eventMeshIDC);
mqProducerWrapper = new MQProducerWrapper(eventMeshGrpcConfiguration.eventMeshConnectorPluginType);
mqProducerWrapper.init(keyValue);
serviceState = ServiceState.INITED;
logger.info("EventMeshProducer [{}] inited...........", producerGroupConfig.getGroupName());
}
Aggregations