Annotation Type TopicPartition
-
@Target({}) @Retention(RUNTIME) public @interface TopicPartition
Used to add topic/partition information to aKafkaListener
.- Author:
- Gary Russell, Artem Bilan
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
topic
The topic to listen on.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description PartitionOffset[]
partitionOffsets
The partitions with initial offsets within the topic.java.lang.String[]
partitions
The partitions within the topic.
-
-
-
-
partitions
java.lang.String[] partitions
The partitions within the topic. Partitions specified here can't be duplicated inpartitionOffsets()
. Each string can contain a comma-delimited list of partitions, or ranges of partitions (e.g.0-5, 7, 10-15
.- Returns:
- the partitions within the topic. Property place holders and SpEL expressions are supported, which must resolve to Integers (or Strings that can be parsed as Integers).
- Default:
- {}
-
-
-
partitionOffsets
PartitionOffset[] partitionOffsets
The partitions with initial offsets within the topic. There must only be one instance ofPartitionOffset
if its 'partition' property is '*'. Partitions specified here can't be duplicated in thepartitions()
.- Returns:
- the
PartitionOffset
array.
- Default:
- {}
-
-