confluent-kafka-dotnet
Show / Hide Table of Contents

Class TopicPartition

Represents a Kafka (topic, partition) tuple.

Inheritance
System.Object
TopicPartition
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public class TopicPartition

Constructors

TopicPartition(String, Partition)

Initializes a new TopicPartition instance.

Declaration
public TopicPartition(string topic, Partition partition)
Parameters
Type Name Description
System.String topic

A Kafka topic name.

Partition partition

A Kafka partition.

Properties

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

Methods

Equals(Object)

Tests whether this TopicPartition 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 TopicPartition and all properties are equal. false otherwise.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Returns a hash code for this TopicPartition.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

An integer that specifies a hash value for this TopicPartition.

Overrides
System.Object.GetHashCode()

ToString()

Returns a string representation of the TopicPartition object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the TopicPartition object.

Overrides
System.Object.ToString()

Operators

Equality(TopicPartition, TopicPartition)

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

Declaration
public static bool operator ==(TopicPartition a, TopicPartition b)
Parameters
Type Name Description
TopicPartition a

The first TopicPartition instance to compare.

TopicPartition b

The second TopicPartition instance to compare.

Returns
Type Description
System.Boolean

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

Inequality(TopicPartition, TopicPartition)

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

Declaration
public static bool operator !=(TopicPartition a, TopicPartition b)
Parameters
Type Name Description
TopicPartition a

The first TopicPartition instance to compare.

TopicPartition b

The second TopicPartition instance to compare.

Returns
Type Description
System.Boolean

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