...
- Block those later messages from consumption until all earlier messages have become visible. That would impact the latency for the later messages (which are already available but can't be consumed).
or - Let the consumer retrieve the later messages, and deliver the earlier one(s) as soon as they becomes visible. That, however, would impact the order of consumption.
TODO: We need to define clearly what "order preserving" means, and how it impacts latencyFor easy consumption and consistency between consumers, we choose ordering over latency. With proper implementation (discussed below), latency can be minimize while maintaining proper ordering.
Design
Before going deep into the details, these are the key principles/features of the messaging system, based on the use cases and requirements described above:
...