Annotation Interface Subscribe.Stream

Enclosing class:
Subscribe

@Target(TYPE) @Retention(RUNTIME) @Documented public static @interface Subscribe.Stream
Annotation for subscribing to messages from another Kalix service.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The unique identifier of the stream in the producing service
    The deployed name of the service to consume, can be the deployed name of another Kalix service in the same Kalix Project or a fully qualified public hostname of a Kalix service in a different project.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    In case you need to consume the same stream multiple times, each subscription should have a unique consumer group.
    boolean
    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
  • Element Details

    • id

      String id
      The unique identifier of the stream in the producing service
    • service

      String service
      The deployed name of the service to consume, can be the deployed name of another Kalix service in the same Kalix Project or a fully qualified public hostname of a Kalix service in a different project.

      Note: The service name is used as unique identifier for tracking progress in consuming it. Changing this name will lead to starting over from the beginning of the event stream.

      Can be a template referencing an environment variable "${MY_ENV_NAME}" set for the service at deploy

    • consumerGroup

      String consumerGroup
      In case you need to consume the same stream multiple times, each subscription should have a unique consumer group.

      Changing the consumer group will lead to starting over from the beginning of the stream.

      Default:
      ""
    • ignoreUnknown

      boolean ignoreUnknown
      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