K
- the key typeV
- the value typepublic interface IRecordHandler<K,V>
IKafkaContinuousConsumer#nextMessages(int)
method.
You receive records one at a time.
Modifier and Type | Method and Description |
---|---|
default void |
onPartitionAssigned(IPartition partition,
org.apache.kafka.clients.consumer.OffsetAndMetadata offsetAndMetadata)
Notification of an assigned partition.
|
default void |
onPartitionRevoked(IPartition partition)
Notification of a revoked partition.
|
void |
onReceive(IPartition partition,
org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
Be notified upon the arrival of a record.
|
default void |
onTick(IPartition partition,
long nextOffsetToRead)
Be regularly called for each managed partition.
|
void onReceive(IPartition partition, org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
partition
- the receiving partition. Use it to acknowledge or fail your records in the way you need.record
- the recorddefault void onTick(IPartition partition, long nextOffsetToRead)
partition
- the partitionnextOffsetToRead
- the first offset not already read from the partitiondefault void onPartitionAssigned(IPartition partition, org.apache.kafka.clients.consumer.OffsetAndMetadata offsetAndMetadata)
partition
- the assigned partitionoffsetAndMetadata
- the committed offsetAndMetadatadefault void onPartitionRevoked(IPartition partition)
partition
- the partitionCopyright © 2014–2023. All rights reserved.