confluent-kafka-dotnet
Show / Hide Table of Contents

Class Message<TKey, TValue>

Represents a (deserialized) message stored in Kafka.

Inheritance
System.Object
Message<TKey, TValue>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public class Message<TKey, TValue>
Type Parameters
Name Description
TKey
TValue

Constructors

Message(String, Int32, Int64, TKey, TValue, Timestamp, Error)

Instantiates a new Message class instance.

Declaration
public Message(string topic, int partition, long offset, TKey key, TValue val, Timestamp timestamp, Error error)
Parameters
Type Name Description
System.String topic

The Kafka topic name associated with this message.

System.Int32 partition

The topic partition id associated with this message.

System.Int64 offset

The offset of this message in the Kafka topic partition.

TKey key

The message key value.

TValue val

The message value.

Timestamp timestamp

The message timestamp.

Error error

A rich Error associated with the message.

Properties

Error

Gets a rich Error associated with the message.

Declaration
public Error Error { get; }
Property Value
Type Description
Error

Key

Gets the message key value.

Declaration
public TKey Key { get; }
Property Value
Type Description
TKey

Offset

Gets the offset of this message in the Kafka topic partition.

Declaration
public Offset Offset { get; }
Property Value
Type Description
Offset

Partition

Gets the partition associated with this message.

Declaration
public int Partition { get; }
Property Value
Type Description
System.Int32

Timestamp

Gets the message timestamp.

Declaration
public Timestamp Timestamp { get; }
Property Value
Type Description
Timestamp

Topic

Gets the topic name associated with this message.

Declaration
public string Topic { get; }
Property Value
Type Description
System.String

TopicPartition

Gets the topic/partition associated with this message.

Declaration
public TopicPartition TopicPartition { get; }
Property Value
Type Description
TopicPartition

TopicPartitionOffset

Gets the topic/partition/offset associated with this message.

Declaration
public TopicPartitionOffset TopicPartitionOffset { get; }
Property Value
Type Description
TopicPartitionOffset

Value

Gets the message value.

Declaration
public TValue Value { get; }
Property Value
Type Description
TValue