Table of Contents

Class KafkaMappingContext

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.dll

Kafka mapping context implementation.

public sealed class KafkaMappingContext : IKafkaMappingContext
Inheritance
KafkaMappingContext
Implements
Inherited Members
Extension Methods

Properties

Headers

Gets all configured headers.

public IReadOnlyDictionary<string, string> Headers { get; }

Property Value

IReadOnlyDictionary<string, string>

Key

Gets or sets the message key (used for partitioning).

public string? Key { get; set; }

Property Value

string

Partition

Gets or sets the target partition (or null for automatic partitioning).

public int? Partition { get; set; }

Property Value

int?

SchemaId

Gets or sets the schema ID for schema registry integration.

public int? SchemaId { get; set; }

Property Value

int?

Topic

Gets or sets the topic name.

public string? Topic { get; set; }

Property Value

string

Methods

ApplyTo(KafkaMessageContext)

Applies this configuration to a Kafka message context.

public void ApplyTo(KafkaMessageContext context)

Parameters

context KafkaMessageContext

The context to apply configuration to.

SetHeader(string, string)

Sets a custom header on the message.

public void SetHeader(string key, string value)

Parameters

key string

The header key.

value string

The header value.