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)
Initializes a new TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffsetError(TopicPartition tp, Offset offset, Error error)
Parameters
Type | Name | Description |
---|---|---|
TopicPartition | tp | Kafka topic name and partition values. |
Offset | offset | A Kafka offset value. |
Error | error | A Kafka error. |
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, Int32, Offset, Error)
Initializes a new TopicPartitionOffsetError instance.
Declaration
public TopicPartitionOffsetError(string topic, int partition, Offset offset, Error error)
Parameters
Type | Name | Description |
---|---|---|
System.String | topic | A Kafka topic name. |
System.Int32 | partition | A Kafka partition value. |
Offset | offset | A Kafka offset value. |
Error | error | A Kafka error. |
Properties
Error
Gets the Kafka error.
Declaration
public Error Error { get; }
Property Value
Type | Description |
---|---|
Error |
Offset
Gets the Kafka partition offset value.
Declaration
public Offset Offset { get; }
Property Value
Type | Description |
---|---|
Offset |
Partition
Gets the Kafka partition.
Declaration
public int Partition { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
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. |