Class RoundRobinKafkaPartitionProvider
- java.lang.Object
-
- org.flowable.eventregistry.spring.kafka.RoundRobinKafkaPartitionProvider
-
- All Implemented Interfaces:
KafkaPartitionProvider
public class RoundRobinKafkaPartitionProvider extends Object implements KafkaPartitionProvider
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicIntegercounterprotected List<Integer>partitions
-
Constructor Summary
Constructors Constructor Description RoundRobinKafkaPartitionProvider(List<Integer> partitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerdeterminePartition(org.flowable.eventregistry.api.OutboundEvent<?> outboundEvent)Determine the partition for the outbound event.
-
-
-
Field Detail
-
counter
protected final AtomicInteger counter
-
-
Method Detail
-
determinePartition
public Integer determinePartition(org.flowable.eventregistry.api.OutboundEvent<?> outboundEvent)
Description copied from interface:KafkaPartitionProviderDetermine the partition for the outbound event. Can benullif you want to use the Kafka default partitioner.- Specified by:
determinePartitionin interfaceKafkaPartitionProvider- Parameters:
outboundEvent- the outbound event- Returns:
- the partition to send to, or
nullif you want to use the Kafka default partioner
-
-