Class Message
Represents a message stored in Kafka.
Inheritance
System.Object
Message
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
Constructors
Message(String, Int32, Int64, Byte[], Byte[], Timestamp, Error)
Instantiates a new Message class instance.
Declaration
public Message(string topic, int partition, long offset, byte[] key, byte[] 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. |
System.Byte[] | key | The message key value. |
System.Byte[] | 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 byte[] Key { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
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 topic 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 Kafka 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 byte[] Value { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |