fn new(
        source_name: String,
        source_id: SourceInstanceId,
        worker_id: usize,
        consumer_activator: SyncActivator,
        connector: ExternalSourceConnector,
        _: SourceDataEncoding,
        logger: Option<Logger>,
        _: SourceBaseMetrics,
    ) -> Result<(KafkaSourceReader, Option<PartitionId>), anyhow::Error> {
        match connector {
            ExternalSourceConnector::Kafka(kc) => Ok((
                KafkaSourceReader::new(
                    source_name,
                    source_id,
                    worker_id,
                    consumer_activator,
                    kc,
                    logger,
                ),
                None,
            )),
            _ => unreachable!(),
        }
    }
/// Create a new instance of a Kafka reader.
Create a new instance of a Kafka reader.
Create a new instance of a Kafka reader .
fn new(
        source_name: String,
        source_id: SourceInstanceId,
        worker_id: usize,
        consumer_activator: SyncActivator,
        connector: ExternalSourceConnector,
        _: SourceDataEncoding,
        logger: Option<Logger>,
        _: SourceBaseMetrics,
    ) -> Result<(KafkaSourceReader, Option<PartitionId>), anyhow::Error> {
        match connector {
            ExternalSourceConnector::Kafka(kc) => Ok((
                KafkaSourceReader::new(
                    source_name,
                    source_id,
                    worker_id,
                    consumer_activator,
                    kc,
                    logger,
                ),
                None,
            )),
            _ => unreachable!(),
        }
    }
fn new ( source_name : String , source_id : SourceInstanceId , worker_id : usize , consumer_activator : SyncActivator , connector : ExternalSourceConnector , _ : SourceDataEncoding , logger : Option < Logger > , _ : SourceBaseMetrics , ) -> Result < ( KafkaSourceReader , Option < PartitionId > ) , anyhow :: Error > { match connector { ExternalSourceConnector :: Kafka ( kc ) => Ok ( ( KafkaSourceReader :: new ( source_name , source_id , worker_id , consumer_activator , kc , logger , ) , None , ) ) , _ => unreachable ! ( ) , } }
Create a new instance of a Kafka reader.
Create a new instance of a Kafka reader .
source_name
String
source_id
SourceInstanceId
worker_id
usize
consumer_activator
SyncActivator
connector
SourceDataEncoding
logger
SourceBaseMetrics
source_name
String
source_id
SourceInstanceId
worker_id
usize
consumer_activator
SyncActivator
connector
SourceDataEncoding
logger
SourceBaseMetrics