if (brokerService != null) {
dummyReceiver.setBrokerService(brokerService);
}
MessageContext mc = createMessageContext(payload, topic, tenantId);
try {
dummyReceiver.processMessage(mc);
} catch (Exception e) {
if (e instanceof EventBrokerException) {
throw (EventBrokerException) e;
}
throw new EventBrokerException("Unable to generate event.", e);