Class DomainEventDeserializerProvider

java.lang.Object
ch.admin.bit.jeap.errorhandling.infrastructure.kafka.DomainEventDeserializerProvider
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

@Component public class DomainEventDeserializerProvider extends Object implements org.springframework.beans.factory.BeanFactoryAware
Factory creating an Avro deserializer capable of deserializing event payload to GenericData.Record. See CustomKafkaAvroDeserializer for details.

Note: CustomKafkaAvroDeserializer cannot be created as a Spring Bean due to its dependency to kafka server classes which are not on the classpath.

  • Constructor Details

    • DomainEventDeserializerProvider

      public DomainEventDeserializerProvider(ch.admin.bit.jeap.messaging.kafka.properties.KafkaProperties kafkaProperties)
  • Method Details

    • getGenericRecordDomainEventDeserializer

      public org.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericData.Record> getGenericRecordDomainEventDeserializer(String clusterName)
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware