Skip to main content
Version: 3.x

KafkaFlow assembly

KafkaFlow namespace

public typedescription
static class BatchingExtensionsno needed
static class ConfigurationBuilderExtensionsProvides extension methods over IConsumerConfigurationBuilder and IProducerConfigurationBuilder
delegate ConsumerCustomFactoryA factory to decorates the consumer created by KafkaFlow
static class ConsumerMiddlewareConfigurationBuilderNo needed
static class ConsumerThrottlingConfigurationBuilderExtensionsProvides extension methods for configuring consumer throttling in KafkaFlow.
interface IKafkaBusProvides access to the kafka bus operations
interface IMessageProducer<TProducer>Provides access to the kafka message producer
interface IMessageProducerProvides access to the kafka producer
class MessageHeadersCollection of message headers
delegate ProducerCustomFactoryA factory to decorates the producer created by KafkaFlow
static class ProducerMiddlewareConfigurationBuilderNo needed
record TopicMetadata
class TopicPartitionMetadata
class TypedHandlerConfigurationBuilderBuilder class for typed handler configuration

KafkaFlow.Clusters namespace

public typedescription
interface IClusterManagerProvides access to Cluster administration

KafkaFlow.Configuration namespace

public typedescription
class ClusterConfigurationRepresents the cluster configuration values
interface IConsumerConfigurationRepresents the Consumer configuration values
interface IProducerConfigurationRepresents the producer configuration values
class KafkaConfigurationRepresents the kafka configuration values
class KafkaFlowConfiguratorA class to configure KafkaFlow
class MiddlewareConfigurationRepresents a middleware configuration
class PendingOffsetsStatisticsHandlerRepresents a handler for pending offsets statistics.
class TopicConfigurationRepresents a Topic configuration

KafkaFlow.Consumers namespace

public typedescription
enum ConsumerStatusAn enum with all consumer status
interface IConsumerRepresents a KafkaFlow consumer
interface IConsumerAccessorProvides access to the configured consumers
interface IConsumerFlowManagerThe consumer flow manager
interface IConsumerMiddlewareContextProvides access to the current consumer's middleware context.
interface IMessageConsumerProvides access to the kafka message consumer
class TopicPartitionLagRepresents the lag in a specific topic and partition

KafkaFlow.Consumers.DistributionStrategies namespace

public typedescription
class BytesSumDistributionStrategyThis strategy sums all bytes in the message key and apply a mod operator with the total number of workers, the resulting number is the worker ID to be chosen This algorithm is fast and creates a good work balance. Messages with the same message key are always delivered in the same worker. Set an optimal message buffer value to avoid idle workers (it will depends how many messages with the same message key are consumed)
class FreeWorkerDistributionStrategyThis strategy chooses the first free worker to process the message. When a worker finishes the processing, it notifies the worker pool that it is free to get a new message This is the fastest and resource-friendly strategy (the message buffer is not used) but messages with the same partition key can be delivered in different workers, so, no message order guarantee
class PartitionKeyDistributionStrategyThis strategy applies a mod operator to the partition key and the total number of workers, the resulting number is the worker ID to be chosen This algorithm is fast and creates a good work balance. Messages with the same partition key are always delivered in the same worker, so, message order is guaranteed In cases where the number of partitions assigned to the consumer is small, this strategy can limit the number of available workers to distribute the messages.

KafkaFlow.Middlewares.Compressor namespace

public typedescription
class CompressorProducerMiddlewareMiddleware to compress the messages when producing
class DecompressorConsumerMiddlewareMiddleware to decompress the messages when consuming

KafkaFlow.Middlewares.ConsumerThrottling namespace

public typedescription
interface IConsumerThrottlingActionDefines a throttling action that can be executed by a KafkaFlow consumer.
interface IConsumerThrottlingMetricDefines a metric that is used by the KafkaFlow consumer throttling feature.

KafkaFlow.Middlewares.ConsumerThrottling.Configuration namespace

public typedescription
interface IConsumerThrottlingActionConfigurationBuilderProvides a builder interface for setting up actions in the KafkaFlow consumer throttling feature.
interface IConsumerThrottlingActionsConfigurationBuilderProvides methods to configure throttling actions for KafkaFlow consumers.
interface IConsumerThrottlingMetricConfigurationBuilderAn interface to configure the throttling metrics for KafkaFlow consumers.
interface IConsumerThrottlingThresholdActionConfigurationBuilderAn interface to configure the actions applied when a throttling threshold is met.

KafkaFlow.Middlewares.Serializer namespace

public typedescription
class DeserializerConsumerMiddlewareMiddleware to deserialize messages when consuming
class SerializerProducerMiddlewareMiddleware to serialize messages when producing

KafkaFlow.Middlewares.Serializer.Resolvers namespace

public typedescription
interface IMessageTypeResolverUsed by the serializer middleware to resolve the type when consuming and store it when producing
class SingleMessageTypeResolverThe message type resolver to be used when all messages are the same type

KafkaFlow.Producers namespace

public typedescription
class BatchProduceExceptionException thrown by BatchProduceAsync
static class BatchProduceExtensionNo needed
class BatchProduceItemRepresents a message to be produced in batch
interface IProducerAccessorProvides access to the configured producers