"""Model to parse MSK events triggered by EventProducer.produce().""" from kafka_utils.exceptions import IneligibleEventException class BaseEventMessage: """BaseEventMessage class.""" def __init__(self, message, topic): """Initialize. Args: message (dict): Deserialized message. topic (str): The topic for the message. """ if message is None: raise IneligibleEventException('Message cannot be null') self.topic = topic self.message = message