Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Event vs Topic Apache Kafka

Tags:

apache-kafka

Sorry this may be a basic question trying to understand the difference between an event and topic in Apache Kafka.

My understanding is both are same and in streaming context topic is called as Event. Correct me if I am wrong.

like image 836
shiv455 Avatar asked Jul 19 '17 16:07

shiv455


People also ask

What is event type in Kafka?

As per the requirement, we can choose any implement strategies for the Kafka events. The Kafka event majorly distributed into three major strategies like. Single Topic. topic-per-entity-type. topic-per-entity.

What is the difference between topic and broker in Kafka?

Brokers are the heart of Kafka Cluster and its connector to the outer words such as consumer, producer, confluent connector. Kafka Topic consists of multiple partitions distributed across Brokers.

What is difference between topic and partition in Kafka?

Kafka's topics are divided into several partitions. While the topic is a logical concept in Kafka, a partition is the smallest storage unit that holds a subset of records owned by a topic . Each partition is a single log file where records are written to it in an append-only fashion.

What is a topic in Apache Kafka?

Kafka Topic. A Topic is a category/feed name to which records are stored and published. As said before, all Kafka records are organized into topics. Producer applications write data to topics and consumer applications read from topics.


2 Answers

What is called "event" in the streaming context (if we speak about Kafka Streams API) is a "message" in the normal Kafka usage. The topic is the place where you store messages (or events, in streaming context).

like image 141
ppatierno Avatar answered Sep 28 '22 11:09

ppatierno


Event (the data) is something you would store in a Topic e.g. userA updated his profile - this is an event and you can send this across (in any format e.g. a JSON payload) to a Kafka topic. Both are not same - no matter what the context

like image 37
Abhishek Avatar answered Sep 28 '22 13:09

Abhishek