Annotation Interface TopicPartition
Used to add topic/partition information to a
KafkaListener
.- Author:
- Gary Russell, Artem Bilan
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe partitions with initial offsets within the topic.String[]
The partitions within the topic.
-
Element Details
-
topic
String topicThe topic to listen on.- Returns:
- the topic to listen on. Property place holders and SpEL expressions are supported, which must resolve to a String.
-
-
-
partitions
String[] partitionsThe 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[] partitionOffsetsThe 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:
- {}
-