In this article, I'm going to show you how to build and use Apache Kafka in a Windows environment. Before you begin, give a brief introduction to Kafka and then practice.
Apache Kafka
Kafka is a distributed solution for publish-subscribe messages. Kafka is fast, scalable and durable compared to traditional messaging systems. Imagine a traditional publish-subscribe messaging system that producers generate/write messages to topic, the other side, consumers consume/read messages from topic. The Kafka topic can be partitioned (partition) and replicated (replicate) between multiple servers.
You can get more details from Kafka official website.
I have consulted this blog (http://blog.cloudera.com/blog/2014/09/apache-kafka-for-beginners/). It's a simple and good explanation of what Kafka is. The two images are also taken from the same blog post.
"Messages is simply byte arrays and the developers can use them to store any object with any Format–with String, J SON, and Avro the most common. It is possible to attach a key to each message, in which case the producer guarantees, all messages with the same key Would arrive to the same partition. When consuming from a topic, it's possible to configure a consumer group with multiple consumers. Each consumer in a consumer group would read messages from a unique subset of partitions in each topic they subscribe to, s o Each message was delivered to one consumer in the group, and all messages with the same key arrive at the same consumer.
"What's makes Kafka unique is the Kafka treats each topic partition as a log (an ordered set of messages). Each message in a partition is assigned a unique offset. Kafka does not attempt to track which messages were read by each consumer and only retain unread messages; Rather, Kafka retains all messages for a set amount of time, and consumers is responsible to track their at each Log. Consequently, Kafka can support a large number of consumers and retain large amounts of the data with very little overhead. "
Apache Kafka-quick Start on Windows