View Source KafkaEx.Cluster.PartitionInfo (kafka_ex v1.0.0-rc.1)
Information about a topic partition.
Contains metadata about a specific partition including its leader broker, replica assignments, and in-sync replica (ISR) list.
Java equivalent: org.apache.kafka.common.PartitionInfo
Summary
Functions
Builds a PartitionInfo struct from keyword options.
Builds a PartitionInfo struct from partition metadata response.
Returns the list of in-sync replica node IDs.
Returns the leader node ID.
Returns the partition number.
Returns the list of replica node IDs.
Types
Functions
Builds a PartitionInfo struct from keyword options.
Options
:partition_id- (required) The partition number:leader- The leader node ID (default: -1):replicas- List of replica node IDs (default: []):isr- List of in-sync replica node IDs (default: [])
Builds a PartitionInfo struct from partition metadata response.
Parameters
The metadata map should contain:
:error_code- Must be 0 for successful parsing:partition- The partition number:leader- The leader node ID:replicas- List of replica node IDs:isr- List of in-sync replica node IDs
Returns the list of in-sync replica node IDs.
Provided for API compatibility with Java's PartitionInfo.inSyncReplicas().
Returns the leader node ID.
Provided for API compatibility with Java's PartitionInfo.leader().
Returns -1 if no leader is available.
Returns the partition number.
Provided for API compatibility with Java's PartitionInfo.partition().
Returns the list of replica node IDs.
Provided for API compatibility with Java's PartitionInfo.replicas().