@Documented
@Retention(value=RUNTIME)
@Target(value=PARAMETER)
@Bindable
@Inherited
public @interface KafkaPartition
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.