com.networknt.eventuate.cdc.server.CdcServerStartupHookProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventuate-cdc-server Show documentation
Show all versions of eventuate-cdc-server Show documentation
A restful micro service server component of change data capture.
package com.networknt.eventuate.cdc.server;
import com.networknt.eventuate.server.common.EventTableChangesToAggregateTopicTranslator;
import com.networknt.eventuate.server.common.PublishedEvent;
import com.networknt.server.StartupHookProvider;
import com.networknt.service.SingletonServiceFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* CdcServer StartupHookProvider. start cdc service
*/
public class CdcServerStartupHookProvider implements StartupHookProvider {
private static final Logger logger = LoggerFactory.getLogger(CdcServerStartupHookProvider.class);
@Override
public void onStartup() {
EventTableChangesToAggregateTopicTranslator translator = SingletonServiceFactory.getBean(EventTableChangesToAggregateTopicTranslator.class);
translator.start();
logger.info("CdcServerStartupHookProvider is called");
}
}