Annotation Type KafkaListener


@Retention(CLASS) @Target(METHOD) public @interface KafkaListener
Spring Kafka's @KafkaListener, so a Spring listener ports by changing its import: the same as MessageListener, over whichever transport is configured. topics are the destinations and groupId the group; concurrency is a number of consumer threads.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Consumer threads, as a number.
    The consumer group.
    Accepted and ignored: a listener's identity is its method.
    The topics.
  • Element Details

    • topics

      String[] topics
      The topics.
      Default:
      {}
    • groupId

      String groupId
      The consumer group.
      Default:
      ""
    • concurrency

      String concurrency
      Consumer threads, as a number.
      Default:
      ""
    • id

      String id
      Accepted and ignored: a listener's identity is its method.
      Default:
      ""