Class KafkaCrossDcConsumer

  • All Implemented Interfaces:
    Runnable

    public class KafkaCrossDcConsumer
    extends Consumer.CrossDcConsumer
    This is a Java class called KafkaCrossDcConsumer, which is part of the Apache Solr framework. It consumes messages from Kafka and mirrors them into a Solr instance. It uses a KafkaConsumer object to subscribe to one or more topics and receive ConsumerRecords that contain MirroredSolrRequest objects. The SolrMessageProcessor handles each MirroredSolrRequest and sends the resulting UpdateRequest to the CloudSolrClient for indexing. A ThreadPoolExecutor is used to handle the update requests asynchronously. The KafkaCrossDcConsumer also handles offset management, committing offsets to Kafka and can seek to specific offsets for error recovery. The class provides methods to start and top the consumer thread.