Class CustomKafkaConsumer

java.lang.Object
org.chenile.pubsub.kafka.configuration.CustomKafkaConsumer
All Implemented Interfaces:
EventListener, ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>, Ordered

@Component public class CustomKafkaConsumer extends Object implements ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>, Ordered
Dynamically registers Kafka listener for all topics defined in Chenile configuration.
  • Field Details

  • Constructor Details

    • CustomKafkaConsumer

      public CustomKafkaConsumer()
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event)
      Registers a dynamic Kafka listener after application startup.
      Specified by:
      onApplicationEvent in interface ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface Ordered