Class AbstractKafkaRecordProcessorFacade
java.lang.Object
org.apache.camel.component.kafka.consumer.support.AbstractKafkaRecordProcessorFacade
- All Implemented Interfaces:
KafkaRecordProcessorFacade
- Direct Known Subclasses:
KafkaRecordBatchingProcessorFacade,KafkaRecordStreamingProcessorFacade
public abstract class AbstractKafkaRecordProcessorFacade
extends Object
implements KafkaRecordProcessorFacade
Common code for processing consumer records retrieved from Kafka
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final KafkaConsumerprotected final CommitManagerprotected final KafkaConsumerListenerprotected final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractKafkaRecordProcessorFacade(KafkaConsumer camelKafkaConsumer, String threadId, CommitManager commitManager, KafkaConsumerListener consumerListener) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanWhether the the Camel consumer is stoppingprotected voidprotected voidlogRecords(org.apache.kafka.clients.consumer.ConsumerRecords<Object, Object> allRecords) Utility to log record informationprotected voidlogRecordsInPartition(List<org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object>> partitionRecords, org.apache.kafka.common.TopicPartition partition) Utility to log record information along with partitionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.component.kafka.consumer.support.KafkaRecordProcessorFacade
processPolledRecords
-
Field Details
-
camelKafkaConsumer
-
threadId
-
commitManager
-
consumerListener
-
-
Constructor Details
-
AbstractKafkaRecordProcessorFacade
protected AbstractKafkaRecordProcessorFacade(KafkaConsumer camelKafkaConsumer, String threadId, CommitManager commitManager, KafkaConsumerListener consumerListener)
-
-
Method Details
-
isStopping
protected boolean isStopping()Whether the the Camel consumer is stopping- Returns:
- true if is stopping or false otherwise
-
logRecordsInPartition
protected void logRecordsInPartition(List<org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object>> partitionRecords, org.apache.kafka.common.TopicPartition partition) Utility to log record information along with partition- Parameters:
partitionRecords- records from partitionpartition- topic/partition information
-
logRecords
protected void logRecords(org.apache.kafka.clients.consumer.ConsumerRecords<Object, Object> allRecords) Utility to log record information- Parameters:
allRecords- records retrieved from Kafka
-
logRecord
-