Table of Contents

Class KafkaPipelineBuilderExtensions

Namespace
Pipelinez.Kafka
Assembly
Pipelinez.Kafka.dll

Provides Kafka transport extension methods for PipelineBuilder<T>.

public static class KafkaPipelineBuilderExtensions
Inheritance
KafkaPipelineBuilderExtensions
Inherited Members

Methods

WithKafkaDeadLetterDestination<T, TRecordKey, TRecordValue>(PipelineBuilder<T>, KafkaDestinationOptions, Func<PipelineDeadLetterRecord<T>, Message<TRecordKey, TRecordValue>>)

Configures the pipeline to write dead-letter records to Kafka.

public static PipelineBuilder<T> WithKafkaDeadLetterDestination<T, TRecordKey, TRecordValue>(this PipelineBuilder<T> builder, KafkaDestinationOptions config, Func<PipelineDeadLetterRecord<T>, Message<TRecordKey, TRecordValue>> recordMapper) where T : PipelineRecord where TRecordKey : class where TRecordValue : class

Parameters

builder PipelineBuilder<T>

The pipeline builder to configure.

config KafkaDestinationOptions

The Kafka destination configuration.

recordMapper Func<PipelineDeadLetterRecord<T>, Message<TRecordKey, TRecordValue>>

Maps the dead-letter envelope into the Kafka message to publish.

Returns

PipelineBuilder<T>

The same builder for chaining.

Type Parameters

T

The pipeline record type.

TRecordKey

The Kafka key type.

TRecordValue

The Kafka value type.

WithKafkaDestination<T, TRecordKey, TRecordValue>(PipelineBuilder<T>, KafkaDestinationOptions, Func<T, Message<TRecordKey, TRecordValue>>)

Configures the pipeline to publish records to Kafka.

public static PipelineBuilder<T> WithKafkaDestination<T, TRecordKey, TRecordValue>(this PipelineBuilder<T> builder, KafkaDestinationOptions config, Func<T, Message<TRecordKey, TRecordValue>> recordMapper) where T : PipelineRecord where TRecordKey : class where TRecordValue : class

Parameters

builder PipelineBuilder<T>

The pipeline builder to configure.

config KafkaDestinationOptions

The Kafka destination configuration.

recordMapper Func<T, Message<TRecordKey, TRecordValue>>

Maps a pipeline record to the Kafka message to publish.

Returns

PipelineBuilder<T>

The same builder for chaining.

Type Parameters

T

The pipeline record type.

TRecordKey

The Kafka key type.

TRecordValue

The Kafka value type.

WithKafkaSource<T, TRecordKey, TRecordValue>(PipelineBuilder<T>, KafkaSourceOptions, Func<TRecordKey, TRecordValue, T>)

Configures the pipeline to consume records from Kafka.

public static PipelineBuilder<T> WithKafkaSource<T, TRecordKey, TRecordValue>(this PipelineBuilder<T> builder, KafkaSourceOptions config, Func<TRecordKey, TRecordValue, T> recordMapper) where T : PipelineRecord where TRecordKey : class where TRecordValue : class

Parameters

builder PipelineBuilder<T>

The pipeline builder to configure.

config KafkaSourceOptions

The Kafka source configuration.

recordMapper Func<TRecordKey, TRecordValue, T>

Maps the Kafka key and value into a pipeline record.

Returns

PipelineBuilder<T>

The same builder for chaining.

Type Parameters

T

The pipeline record type.

TRecordKey

The Kafka key type.

TRecordValue

The Kafka value type.

WithKafkaSource<T, TRecordKey, TRecordValue>(PipelineBuilder<T>, KafkaSourceOptions, Func<TRecordKey, TRecordValue, T>, KafkaPartitionScalingOptions)

Configures the pipeline to consume records from Kafka with explicit partition scaling behavior.

public static PipelineBuilder<T> WithKafkaSource<T, TRecordKey, TRecordValue>(this PipelineBuilder<T> builder, KafkaSourceOptions config, Func<TRecordKey, TRecordValue, T> recordMapper, KafkaPartitionScalingOptions partitionScalingOptions) where T : PipelineRecord where TRecordKey : class where TRecordValue : class

Parameters

builder PipelineBuilder<T>

The pipeline builder to configure.

config KafkaSourceOptions

The Kafka source configuration.

recordMapper Func<TRecordKey, TRecordValue, T>

Maps the Kafka key and value into a pipeline record.

partitionScalingOptions KafkaPartitionScalingOptions

The partition-aware execution settings to apply.

Returns

PipelineBuilder<T>

The same builder for chaining.

Type Parameters

T

The pipeline record type.

TRecordKey

The Kafka key type.

TRecordValue

The Kafka value type.