# Event Ordering

Record: `arch:event-ordering`
Kind: constraint
Layer: [Causality Core](https://banes-lab.com/records/layer/causality-core.md)
Severity: contextual
Scope: stream, queue, consumer
Canonical: https://banes-lab.com/ontology#arch-event-ordering

## Repair

- Refactored by: Add Partition Key, Sequence Number, Reorder Buffer
- Detected by: missing ordering key/sequence checks
- Violated by: stateful consumers processing out of order
- Measured by: out-of-order rate
- Enforced by: stream config, consumer tests

## requires

- [Ordering Key or Sequence](https://banes-lab.com/records/lex/ordering-key-or-sequence.md)

## reinforces

- [Causality](https://banes-lab.com/records/arch/causality.md)

## enables

- [Correct Stateful Processing](https://banes-lab.com/records/lex/correct-stateful-processing.md)

## conflicts-with

- [Unordered Parallel Consumption](https://banes-lab.com/records/lex/unordered-parallel-consumption.md)

## tensions-with

- [Throughput](https://banes-lab.com/records/arch/throughput.md)

## tensions

- [Event Ordering Throughput](https://banes-lab.com/records/tension/event-ordering-throughput.md)

## referenced-by

- [Causality](https://banes-lab.com/records/arch/causality.md)
- [Hybrid Logical Clocks](https://banes-lab.com/records/arch/hybrid-logical-clocks.md)
- [Total-Order Broadcast](https://banes-lab.com/records/arch/total-order-broadcast.md)
