ServiceRegistration producerRegistration = bundleContext.registerService(EventProducer.class.getCanonicalName(), producer, (Dictionary) serviceProperties);
producerRegistrations.put(groupName, producerRegistration);
}
if (!consumerRegistrations.containsKey(groupName)) {
EventConsumer consumer = groupConsumer.get(groupName);
if (consumer == null) {
consumer = eventTransportFactory.getEventConsumer(groupName, true);
groupConsumer.put(groupName, consumer);
} else if (!consumer.isConsuming()) {
consumer.start();
}
ServiceRegistration consumerRegistration = bundleContext.registerService(EventConsumer.class.getCanonicalName(), consumer, (Dictionary) serviceProperties);
consumerRegistrations.put(groupName, consumerRegistration);
}