       if (event.config.sendEvents) {         eventProducer.get.publish(event.event).andThen {           case Failure(e) => logger.error("Error while pushing event to kafka", e)         }       }     