bharathi
bharathi

Reputation: 6271

Apache kafka about replica and partitions

I tried to follow

https://medium.com/@iet.vijay/kafka-multi-brokers-multi-consumers-and-message-ordering-b61ad7841875

to create multiple brokers and consumer.

I am able to produce message and consume the same.

when i try to describe the topic the below is the output which I got.

enter image description here

Can some one explain me about the partitions and leader and replicas here in above image.

Upvotes: 0

Views: 117

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191701

All producer and consumer requests are sent to the leader broker, which is elected by the Kafka Controller.

Replicas are the non-leader broker. Replicas can be in or out of sync with the leader (ISR = "in sync replica")

The numbers that are shown are each of the broker.id values from the broker properties, which default to increment from 0 if not set

More details at https://kafka.apache.org/documentation/#replication

Worth pointing out that running multiple brokers on a single host is less than ideal; you still have a single point of failure and you're causing unnecessary duplicate writes on single hard drive for each replica

Upvotes: 1

Related Questions