private static Log log = LogFactory.getLog(EventPublisher.class);
public void process(StatisticData[] statisticData) {
EventBroker broker = StatisticsServiceComponent.getEventBroker();
Message message = new Message();
OMElement eventPayLoad = null;
for (StatisticData statistic : statisticData) {
eventPayLoad = constructEventPayLoad(statistic);
message.setMessage(eventPayLoad);
try {
SuperTenantCarbonContext.startTenantFlow();
int tenantId = SuperTenantCarbonContext.getCurrentContext(StatisticsServiceComponent.getConfigurationContext()).getTenantId();
SuperTenantCarbonContext.getCurrentContext().setTenantId(tenantId);
SuperTenantCarbonContext.getCurrentContext().getTenantDomain(true);