1.

What is a Topic? How Kafka use the topic to communicate from the producer to consumer?

Answer»

Topic is a logical feed name to which RECORDS are published. Topics in KAFKA supports multi-subscriber model, so that topic can have zero, one, or many consumers that subscribe to the data written to it.

  • Topic is a specific category which keep the stream of messages.
  • Topic split into partition.
  • For each Kafka, there at least one partition should be there.
  • Each partition contains message or payload in a non-modified ordered sequence. 
  • Each message with in a partition has an identifier, which is called as a offset.
  • A topic has a name, and it MUST be unique across the cluster. 
  • PRODUCER need topic to publish the payload. 
  • Consumer pulled the same payload from the consumer. 
  • For every Topic the cluster maintain the log LOOK like below.

Every partition has an ordered and immutable sequence of records which is continuously appended to—a structured commit log. The Kafka cluster durably persists all published records—whether they have been consumed—using a configurable retention period.



Discussion

No Comment Found