What is an event?
In Apache Kafka, an event is an indication that something has happened. It states what happened, when it happened, and who or what was involved. In other words, an event is a combination of notification and state.
What information should an event contain?
In order to be complete, an event should have a timestamp stating when the event happened, and optionally some state that describes what has happened and who was involved.
What are some examples of events in Apache Kafka?
Events can be anything that has happened—a user clicking on a webpage, an incoming order on an ecommerce site, or a reading from an IoT device to name a few.
As an example, consider a reading from an IoT device such as a moisture sensor. There would be a timestamp indicating when that reading was captured. Additionally, there would be a key that states the IoT device from which the reading came as well as the actual readings that were measured.