Class TopicPartitionOffsetError
Represents a Kafka (topic, partition, offset, error) tuple.
Inheritance
Inherited Members
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public class TopicPartitionOffsetError
Constructors
TopicPartitionOffsetError(TopicPartition, Offset, Error, Nullable<Int32>)
Initializes a new TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffsetError(TopicPartition tp, Offset offset, Error error, int? leaderEpoch = null)
Parameters
Type | Name | Description |
---|---|---|
TopicPartition | tp | Kafka topic name and partition values. |
Offset | offset | A Kafka offset value. |
Error | error | A Kafka error. |
System.Nullable<System.Int32> | leaderEpoch | The offset leader epoch (optional). |
TopicPartitionOffsetError(TopicPartitionOffset, Error)
Initializes a new TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffsetError(TopicPartitionOffset tpo, Error error)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffset | tpo | Kafka topic name, partition and offset values. |
Error | error | A Kafka error. |
TopicPartitionOffsetError(String, Partition, Offset, Error, Nullable<Int32>)
Initializes a new TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffsetError(string topic, Partition partition, Offset offset, Error error, int? leaderEpoch = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | topic | A Kafka topic name. |
Partition | partition | A Kafka partition value. |
Offset | offset | A Kafka offset value. |
Error | error | A Kafka error. |
System.Nullable<System.Int32> | leaderEpoch | The offset leader epoch (optional). |
Properties
Error
Gets the Kafka error.
Declaration
public Error Error { get; }
Property Value
Type | Description |
---|---|
Error |
LeaderEpoch
Gets the offset leader epoch (optional).
Declaration
public int? LeaderEpoch { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Offset
Gets the Kafka partition offset value.
Declaration
public Offset Offset { get; }
Property Value
Type | Description |
---|---|
Offset |
Partition
Gets the Kafka partition.
Declaration
public Partition Partition { get; }
Property Value
Type | Description |
---|---|
Partition |
Topic
Gets the Kafka topic name.
Declaration
public string Topic { get; }
Property Value
Type | Description |
---|---|
System.String |
TopicPartition
Gets the TopicPartition component of this TopicPartitionOffsetError instance.
Declaration
public TopicPartition TopicPartition { get; }
Property Value
Type | Description |
---|---|
TopicPartition |
TopicPartitionOffset
Gets the TopicPartitionOffset component of this TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffset TopicPartitionOffset { get; }
Property Value
Type | Description |
---|---|
TopicPartitionOffset |
Methods
Equals(Object)
Tests whether this TopicPartitionOffsetError instance is equal to the specified object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to test. |
Returns
Type | Description |
---|---|
System.Boolean | true if obj is a TopicPartitionOffsetError and all properties are equal. false otherwise. |
Overrides
GetHashCode()
Returns a hash code for this TopicPartitionOffsetError.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | An integer that specifies a hash value for this TopicPartitionOffsetError. |
Overrides
ToString()
Returns a string representation of the TopicPartitionOffsetError object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string representation of the TopicPartitionOffsetError object. |
Overrides
Operators
Equality(TopicPartitionOffsetError, TopicPartitionOffsetError)
Tests whether TopicPartitionOffsetError instance a is equal to TopicPartitionOffsetError instance b.
Declaration
public static bool operator ==(TopicPartitionOffsetError a, TopicPartitionOffsetError b)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffsetError | a | The first TopicPartitionOffsetError instance to compare. |
TopicPartitionOffsetError | b | The second TopicPartitionOffsetError instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if TopicPartitionOffsetError instances a and b are equal. false otherwise. |
Explicit(TopicPartitionOffsetError to TopicPartitionOffset)
Converts TopicPartitionOffsetError instance to TopicPartitionOffset instance. NOTE: Throws KafkaException if Error.Code != ErrorCode.NoError
Declaration
public static explicit operator TopicPartitionOffset(TopicPartitionOffsetError tpoe)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffsetError | tpoe | The TopicPartitionOffsetError instance to convert. |
Returns
Type | Description |
---|---|
TopicPartitionOffset | TopicPartitionOffset instance converted from TopicPartitionOffsetError instance |
Inequality(TopicPartitionOffsetError, TopicPartitionOffsetError)
Tests whether TopicPartitionOffsetError instance a is not equal to TopicPartitionOffsetError instance b.
Declaration
public static bool operator !=(TopicPartitionOffsetError a, TopicPartitionOffsetError b)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffsetError | a | The first TopicPartitionOffsetError instance to compare. |
TopicPartitionOffsetError | b | The second TopicPartitionOffsetError instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if TopicPartitionOffsetError instances a and b are not equal. false otherwise. |