Interface KafkaEventProcessorFactory
-
public interface KafkaEventProcessorFactoryTo 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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Cleanup resources held by factory, if any (for example, a EventReader instance cache)KafkaEventReadergetEventReader(String topic, ClassLoader cl)Returns a KafkaEventReader to be used for the provided topic and classloaderKafkaEventWritergetEventWriter(String topic)Returns a KafkaEventWriter to be used for the provided topicdefault voidreaderUndeployed(String topic, ClassLoader cl)To be implemented only by those factories using a reader cache
-
-
-
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 topiccl- 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
-
-