TopicEventListener topicEventListener = new TopicEventListener(this, input);
// subscribe to the broker if given.
if (input.getBrokerName() != null) {
BrokerEventListener brokerEventListener = new BrokerEventListener(topicEventListener);
BrokerService brokerService = CEPServiceValueHolder.getInstance().getBrokerService();
BrokerConfigurationHelper brokerConfigurationHelper = new BrokerConfigurationHelper();
BrokerConfiguration brokerConfiguration =
brokerConfigurationHelper.getBrokerConfiguration(input.getBrokerName(), tenantId);
try {
brokerService.subscribe(brokerConfiguration, input.getTopic(),
brokerEventListener, axisConfiguration);
} catch (BrokerEventProcessingException e) {
String errorMessage = "Can not subscribe to the broker " + input.getBrokerName();