Interface KafkaEventProcessorFactory


  • public interface KafkaEventProcessorFactory
    To be implemented by those interested on providing a custom serialization mechanism for Kafka and do not want to rely on caching and reflection mechanism provided by the default implementation.
    • Method Detail

      • getEventReader

        KafkaEventReader getEventReader​(String topic,
                                        ClassLoader cl)
        Returns a KafkaEventReader to be used for the provided topic and classloader
        Parameters:
        topic - name of the topic
        cl - must be used to load classes
        Returns:
        KafkaEventReader instance, which might be a newly created instance or an already existing one
      • getEventWriter

        KafkaEventWriter getEventWriter​(String topic)
        Returns a KafkaEventWriter to be used for the provided topic
        Parameters:
        topic - name of the topic
        Returns:
        KafkaEventReader instance, typically the same instance per topic
      • close

        default void close()
        Cleanup resources held by factory, if any (for example, a EventReader instance cache)
      • readerUndeployed

        default void readerUndeployed​(String topic,
                                      ClassLoader cl)
        To be implemented only by those factories using a reader cache