Cluster

Cluster represents a subset of the nodes and topic partitions in a Kafka cluster.

Note
org.apache.kafka.common.Cluster is a public final class.

A special variant of a cluster is boostrap cluster that is made up of the bootstrap brokers that are mandatory (and specified explicitly) when Kafka clients are created, i.e. KafkaAdminClient, AdminClient, KafkaConsumer and KafkaProducer.

Note
A bootstrap cluster does not hold all information about the cluster.
Table 1. Cluster’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

isBootstrapConfigured

Flag…​FIXME

Used when…​FIXME

partitionsByTopic

bootstrap Method

static Cluster bootstrap(List<InetSocketAddress> addresses)

bootstrap…​FIXME

Note
bootstrap is used when KafkaAdminClient, AdminClient, KafkaConsumer and KafkaProducer are created.

isBootstrapConfigured Method

boolean isBootstrapConfigured()

isBootstrapConfigured gives isBootstrapConfigured internal flag.

Note
isBootstrapConfigured is used when…​FIXME

Getting Partitions for Topic — partitionsForTopic Method

List<PartitionInfo> partitionsForTopic(String topic)

partitionsForTopic returns a collection of zero or more partition of the input topic from partitionsByTopic internal lookup table.

Note

partitionsForTopic is used when:

results matching ""

    No results matching ""