Class KafkaMappingContext
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
Key
Gets or sets the message key (used for partitioning).
public string? Key { get; set; }
Property Value
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
Methods
ApplyTo(KafkaMessageContext)
Applies this configuration to a Kafka message context.
public void ApplyTo(KafkaMessageContext context)
Parameters
contextKafkaMessageContextThe context to apply configuration to.
SetHeader(string, string)
Sets a custom header on the message.
public void SetHeader(string key, string value)