Package akka.javasdk.annotations
Annotation Interface Consume.FromTopic
- Enclosing class:
Consume
Annotation for consuming messages from a topic (i.e PubSub or Kafka topic).
The underlying method must be declared to receive one parameter for the received messages. Use one method with the common message type as parameter, or several methods with different parameter types corresponding to different messages types.
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionAssign the consumer group name to be used on the broker.boolean
This option is only available for classes.
-
Element Details
-
value
String valueAssign the name of the topic to consume the stream from. -
consumerGroup
String consumerGroupAssign the consumer group name to be used on the broker.- Default:
""
-
ignoreUnknown
boolean ignoreUnknownThis 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
-