Annotation Interface Subscribe.Topic

Enclosing class:
Subscribe

@Target({METHOD,TYPE}) @Retention(RUNTIME) @Documented public static @interface Subscribe.Topic
Annotation for subscribing to messages from a topic (i.e PubSub or Kafka topic).
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Assign the name of the topic to consume the stream from.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Assign the consumer group name to be used on the broker.
    boolean
    This option is only available for classes.
  • Element Details

    • value

      String value
      Assign the name of the topic to consume the stream from.
    • consumerGroup

      String consumerGroup
      Assign the consumer group name to be used on the broker.
      Default:
      ""
    • ignoreUnknown

      boolean ignoreUnknown
      This option is only available for classes. Using it in a method has no effect.

      When there is no method in the class whose input type matches the event type:

      • if ignoreUnknown is true the event is discarded
      • if false, an Exception is raised
      Default:
      false