confluent-kafka-dotnet
Show / Hide Table of Contents

Class TopicPartitionError

Represents a Kafka (topic, partition, error) tuple.

Inheritance
object
TopicPartitionError
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public class TopicPartitionError

Constructors

TopicPartitionError(TopicPartition, Error)

Initializes a new TopicPartitionError instance.

Declaration
public TopicPartitionError(TopicPartition tp, Error error)
Parameters
TypeNameDescription
TopicPartitiontp

Kafka topic name and partition values.

Errorerror

A Kafka error.

TopicPartitionError(string, Partition, Error)

Initializes a new TopicPartitionError instance.

Declaration
public TopicPartitionError(string topic, Partition partition, Error error)
Parameters
TypeNameDescription
stringtopic

A Kafka topic name.

Partitionpartition

A Kafka partition value.

Errorerror

A Kafka error.

Properties

Error

Gets the Kafka error.

Declaration
public Error Error { get; }
Property Value
TypeDescription
Error

Partition

Gets the Kafka partition.

Declaration
public Partition Partition { get; }
Property Value
TypeDescription
Partition

Topic

Gets the Kafka topic name.

Declaration
public string Topic { get; }
Property Value
TypeDescription
string

TopicPartition

Gets the TopicPartition component of this TopicPartitionError instance.

Declaration
public TopicPartition TopicPartition { get; }
Property Value
TypeDescription
TopicPartition

Methods

Equals(object)

Tests whether this TopicPartitionError instance is equal to the specified object.

Declaration
public override bool Equals(object obj)
Parameters
TypeNameDescription
objectobj

The object to test.

Returns
TypeDescription
bool

true if obj is a TopicPartitionError and all properties are equal. false otherwise.

Overrides
object.Equals(object)

GetHashCode()

Returns a hash code for this TopicPartitionError.

Declaration
public override int GetHashCode()
Returns
TypeDescription
int

An integer that specifies a hash value for this TopicPartitionError.

Overrides
object.GetHashCode()

ToString()

Returns a string representation of the TopicPartitionError object.

Declaration
public override string ToString()
Returns
TypeDescription
string

A string representation of the TopicPartitionError object.

Overrides
object.ToString()

Operators

operator ==(TopicPartitionError, TopicPartitionError)

Tests whether TopicPartitionError instance a is equal to TopicPartitionError instance b.

Declaration
public static bool operator ==(TopicPartitionError a, TopicPartitionError b)
Parameters
TypeNameDescription
TopicPartitionErrora

The first TopicPartitionError instance to compare.

TopicPartitionErrorb

The second TopicPartitionError instance to compare.

Returns
TypeDescription
bool

true if TopicPartitionError instances a and b are equal. false otherwise.

operator !=(TopicPartitionError, TopicPartitionError)

Tests whether TopicPartitionError instance a is not equal to TopicPartitionError instance b.

Declaration
public static bool operator !=(TopicPartitionError a, TopicPartitionError b)
Parameters
TypeNameDescription
TopicPartitionErrora

The first TopicPartitionError instance to compare.

TopicPartitionErrorb

The second TopicPartitionError instance to compare.

Returns
TypeDescription
bool

true if TopicPartitionError instances a and b are not equal. false otherwise.

In this article