Annotation Interface KafkaPartition


@Documented @Retention(RUNTIME) @Target(PARAMETER) @Bindable @Inherited public @interface KafkaPartition
Parameter level annotation to indicate which parameter is bound to the Kafka Partition. It can be used in Integer or int.

When used in producers, indicates which partition is to be used. If the provided value is null then the configured/default partitioning strategy takes place.

When used in consumers, it is populated with the partition that the record was received from.

Note that while using KafkaPartition in the same method as KafkaPartitionKey will not throw an exception, the outcome of doing so is left unspecified.

Since:
3.3.4
Author:
André Prata