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.
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.
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.
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.
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.
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).
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With