Previously, we talked about message processing, but now we will talk about events. An event in this context is something that happens at a particular time. An event is a message that happens at a point in time.
In order to understand events, we have to know the timestamp semantics. An event always has two timestamps, shown as follows:
- Event time: The point in time when the event happened at the data source
- Processing time: The point in time when the event is processed in the data processor
Due to limitations imposed by the laws of physics, the processing time will always be subsequent to and necessarily different from the event time, for the following reasons:
- There is always network latency: The time to travel from the data source to the Kafka broker cannot be zero.
- The client could have a cache: If the client cached some events before, send them to...