Class TopicPartitionError
Represents a Kafka (topic, partition, error) tuple.
Inherited Members
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
| Type | Name | Description |
|---|---|---|
| TopicPartition | tp | Kafka topic name and partition values. |
| Error | error | A Kafka error. |
TopicPartitionError(string, Partition, Error)
Initializes a new TopicPartitionError instance.
Declaration
public TopicPartitionError(string topic, Partition partition, Error error)
Parameters
| Type | Name | Description |
|---|---|---|
| string | topic | A Kafka topic name. |
| Partition | partition | A Kafka partition value. |
| Error | error | A Kafka error. |
Properties
Error
Gets the Kafka error.
Declaration
public Error Error { get; }
Property Value
| Type | Description |
|---|---|
| Error |
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 |
|---|---|
| string |
TopicPartition
Gets the TopicPartition component of this TopicPartitionError instance.
Declaration
public TopicPartition TopicPartition { get; }
Property Value
| Type | Description |
|---|---|
| TopicPartition |
Methods
Equals(object)
Tests whether this TopicPartitionError instance is equal to the specified object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to test. |
Returns
| Type | Description |
|---|---|
| bool | true if obj is a TopicPartitionError and all properties are equal. false otherwise. |
Overrides
GetHashCode()
Returns a hash code for this TopicPartitionError.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | An integer that specifies a hash value for this TopicPartitionError. |
Overrides
ToString()
Returns a string representation of the TopicPartitionError object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of the TopicPartitionError object. |
Overrides
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
| Type | Name | Description |
|---|---|---|
| TopicPartitionError | a | The first TopicPartitionError instance to compare. |
| TopicPartitionError | b | The second TopicPartitionError instance to compare. |
Returns
| Type | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| TopicPartitionError | a | The first TopicPartitionError instance to compare. |
| TopicPartitionError | b | The second TopicPartitionError instance to compare. |
Returns
| Type | Description |
|---|---|
| bool | true if TopicPartitionError instances a and b are not equal. false otherwise. |