Skip to main content

Definition

Assembly: CloudNimble.SimpleMessageBus.Dispatch.Kafka.dll Namespace: CloudNimble.SimpleMessageBus.Dispatch.Kafka Inheritance: System.Object

Syntax

Summary

Processes messages from Apache Kafka and dispatches them to registered message handlers.

Remarks

This processor integrates with Azure WebJobs to automatically trigger message processing when messages arrive in a Kafka topic. It handles message deserialization, lifecycle management, and provides proper logging and dependency injection scope for each message. Unlike Azure Storage Queues, Kafka does not require explicit message deletion. The WebJobs Kafka extension automatically commits offsets after successful processing. If processing fails, the message will be reprocessed based on the consumer group’s offset configuration.

Examples

Constructors

.ctor

Creates a new instance of KafkaProcessor.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ProcessKafkaMessage

Processes a message from the Kafka topic and dispatches it to registered handlers.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task A Task representing the asynchronous operation.

Remarks

This method is triggered automatically by the WebJobs Kafka extension when messages arrive. It deserializes the message envelope, sets up processing context, and dispatches to handlers. The offset is automatically committed after successful processing. If an exception is thrown, the offset is not committed and the message will be reprocessed.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?
  • CloudNimble.SimpleMessageBus.Dispatch.IQueueProcessor