# Event / Messaging / Asynchronous Architecture

> Every principle in this category is listed as a record.

Page: Ontology · Principles
Canonical: https://banes-lab.com/ontology#arch-category-event-messaging-asynchronous-architecture

Every principle in this category is listed as a record. Each record carries its kind, its severity, the scopes it applies at and the layer it lives in, then the edge relations that join it to other records, the records that point back at it, the contracts that answer to it and the tensions it takes part in. The descriptors say how it is violated, detected, measured, repaired and enforced. Where the record carries one, an exemplar shows the shape before and after the principle is applied.

Relations diagram

The relations inside this category.

```mermaid
flowchart LR
n_event_driven_architecture["Event-Driven Architecture"]
n_publish_subscribe_pattern["Publish/Subscribe Pattern"]
n_message_queue["Message Queue"]
n_message_broker["Message Broker"]
n_event_bus["Event Bus"]
n_event_stream["Event Stream"]
n_event_sourcing["Event Sourcing"]
n_command_query_responsibility_segregation["CQRS"]
n_domain_events["Domain Events"]
n_integration_events["Integration Events"]
n_asynchronous_communication["Asynchronous Communication"]
n_service_autonomy["Service Autonomy"]
n_eventual_consistency["Eventual Consistency"]
n_saga_pattern["Saga Pattern"]
n_outbox_pattern["Outbox Pattern"]
n_compensating_transaction["Compensating Transaction"]
n_append_only_log["Append-Only Log"]
n_dead_letter_queue["Dead-Letter Queue"]
n_idempotent_consumer["Idempotent Consumer"]
n_competing_consumers["Competing Consumers"]
n_event_driven_architecture --> n_asynchronous_communication
n_event_driven_architecture --> n_event_sourcing
n_event_driven_architecture --> n_command_query_responsibility_segregation
n_event_bus --> n_event_driven_architecture
n_event_sourcing --> n_append_only_log
n_event_sourcing --> n_domain_events
n_command_query_responsibility_segregation --> n_event_sourcing
n_command_query_responsibility_segregation -.-> n_eventual_consistency
n_domain_events --> n_event_driven_architecture
n_asynchronous_communication --> n_event_driven_architecture
n_saga_pattern --> n_eventual_consistency
n_compensating_transaction --> n_saga_pattern
n_append_only_log --> n_event_sourcing
n_dead_letter_queue --> n_message_queue
n_idempotent_consumer --> n_eventual_consistency
n_competing_consumers --> n_message_queue
```

### Event-Driven Architecture

- Kind: [style](https://banes-lab.com/records/kind/style.md)
- Severity: contextual
- Scope: service, integration, system
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Events](https://banes-lab.com/records/lex/events.md), [Message Contract](https://banes-lab.com/records/lex/message-contract.md), [Idempotency](https://banes-lab.com/records/arch/idempotency.md)

Reinforces
[Low Coupling](https://banes-lab.com/records/arch/low-coupling.md), [Asynchronous Communication](https://banes-lab.com/records/arch/asynchronous-communication.md)

Enables
[Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md), [CQRS](https://banes-lab.com/records/arch/command-query-responsibility-segregation.md), [Saga](https://banes-lab.com/records/lex/saga.md)

In tension with
[Debuggability](https://banes-lab.com/records/lex/debuggability.md), [Strong Consistency](https://banes-lab.com/records/lex/strong-consistency.md)

Conflicts with
[Hidden Temporal Coupling](https://banes-lab.com/records/lex/hidden-temporal-coupling.md)

Referenced by
[Observer Pattern](https://banes-lab.com/records/arch/observer-pattern.md), [Choreography](https://banes-lab.com/records/arch/choreography.md), [Event Bus](https://banes-lab.com/records/arch/event-bus.md), [Domain Events](https://banes-lab.com/records/arch/domain-events.md), [Asynchronous Communication](https://banes-lab.com/records/arch/asynchronous-communication.md), [Idempotency](https://banes-lab.com/records/arch/idempotency.md)

Tensions
[Event-Driven Architecture Debuggability](https://banes-lab.com/records/tension/debuggability-event-driven-architecture.md), [Event-Driven Architecture Strong Consistency](https://banes-lab.com/records/tension/event-driven-architecture-strong-consistency.md)

Violated by
non-idempotent consumers, undocumented event schemas

Detected by
missing correlation IDs, direct synchronous chains

Measured by
event contract coverage, [retry safety](https://banes-lab.com/records/lex/retry-safety.md)

Refactored by
Publish Event, Add Outbox, Add Consumer Contract

Enforced by
schema registry, idempotency tests

Before

```typescript
async function createFoo(foo: Foo) {
await fooStore.save(foo);
await barService.refresh(foo.id);
await bazService.notify(foo.id);
}
```

After

```typescript
async function createFoo(foo: Foo) {
await fooStore.save(foo);
await events.publish({ type: "FooCreated", fooId: foo.id });
}
events.on("FooCreated", updateBarProjection);
events.on("FooCreated", notifyBaz);
```

### Publish/Subscribe Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: integration, eventing
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Publisher](https://banes-lab.com/records/lex/publisher.md), [Subscriber](https://banes-lab.com/records/lex/subscriber.md), [Broker/Event Bus](https://banes-lab.com/records/lex/broker-event-bus.md)

Reinforces
[Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)

Enables
[Fan-Out Notification](https://banes-lab.com/records/lex/fan-out-notification.md)

In tension with
[Delivery Ordering](https://banes-lab.com/records/lex/delivery-ordering.md)

Conflicts with
[Direct Point-to-Point Calls](https://banes-lab.com/records/lex/direct-point-to-point-calls.md)

Tensions
[Publish/Subscribe Pattern Delivery Ordering](https://banes-lab.com/records/tension/delivery-ordering-publish-subscribe-pattern.md)

Violated by
publisher knowing all subscribers

Detected by
direct calls to subscriber list

Measured by
publisher-subscriber coupling

Refactored by
Introduce Topic/Event Bus

Enforced by
messaging contracts

Before

```typescript
function saveFoo(foo: Foo) {
fooStore.save(foo);
auditFoo(foo);
indexFoo(foo);
}
```

After

```typescript
publisher.publish("foo.saved", { fooId: foo.id });
subscriber.on("foo.saved", auditFoo);
subscriber.on("foo.saved", indexFoo);
```

### Message Queue

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Severity: contextual
- Scope: integration, async processing
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Contract](https://banes-lab.com/records/lex/message-contract.md), [Consumer](https://banes-lab.com/records/lex/consumer.md)

Reinforces
[Resilience](https://banes-lab.com/records/arch/resilience.md), [Backpressure](https://banes-lab.com/records/arch/backpressure.md)

Enables
[Asynchronous Processing](https://banes-lab.com/records/lex/asynchronous-processing.md)

In tension with
[Latency](https://banes-lab.com/records/arch/latency.md)

Conflicts with
[In-Memory Direct Invocation](https://banes-lab.com/records/lex/in-memory-direct-invocation.md)

Referenced by
[Dead-Letter Queue](https://banes-lab.com/records/arch/dead-letter-queue.md), [Competing Consumers](https://banes-lab.com/records/arch/competing-consumers.md)

Tensions
[Message Queue Latency](https://banes-lab.com/records/tension/latency-message-queue.md)

Violated by
unbounded in-memory work queues

Detected by
synchronous blocking chains for async work

Measured by
queue depth, retry/dead-letter rates

Refactored by
Introduce Queue, Add Worker

Enforced by
infrastructure policy, load tests

Before

```typescript
for (const foo of foos) await processFoo(foo);
```

After

```typescript
for (const foo of foos) await fooQueue.enqueue({ type: "ProcessFoo", foo });
fooWorker.consume(fooQueue, message => processFoo(message.foo));
```

### Message Broker

- Kind: [artifact](https://banes-lab.com/records/kind/artifact.md)
- Severity: contextual
- Scope: integration, messaging
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Queue/Topics](https://banes-lab.com/records/lex/message-queue-topics.md), [Routing](https://banes-lab.com/records/lex/routing.md)

Reinforces
[Decoupling](https://banes-lab.com/records/lex/decoupling.md), [Scalability](https://banes-lab.com/records/arch/scalability.md)

Enables
[Pub/Sub](https://banes-lab.com/records/lex/pub-sub.md), [Work Distribution](https://banes-lab.com/records/lex/work-distribution.md)

In tension with
[Operational Dependency](https://banes-lab.com/records/lex/operational-dependency.md)

Conflicts with
[Point-to-Point Coupling](https://banes-lab.com/records/lex/point-to-point-coupling.md)

Tensions
[Message Broker Operational Dependency](https://banes-lab.com/records/tension/message-broker-operational-dependency.md)

Violated by
broker bypass for async integration

Detected by
direct service calls in async workflows

Measured by
broker usage coverage

Refactored by
Add Broker, Route Messages

Enforced by
architecture policy

Before

```typescript
await fooService.sendToBar(barMessage);
await fooService.sendToBaz(bazMessage);
```

After

```typescript
await broker.publish("foo.created", fooMessage, { durable: true });
broker.subscribe("foo.created", { group: "bar-consumer", ack: "manual" }, handleBar);
broker.subscribe("foo.created", { group: "baz-consumer", ack: "manual" }, handleBaz);
```

### Event Bus

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Severity: contextual
- Scope: application, integration
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Event Contract](https://banes-lab.com/records/lex/event-contract.md), [Subscriber Model](https://banes-lab.com/records/lex/subscriber-model.md)

Reinforces
[Pub/Sub](https://banes-lab.com/records/lex/pub-sub.md), [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

Enables
[Decoupled Event Distribution](https://banes-lab.com/records/lex/decoupled-event-distribution.md)

In tension with
[Event Storm / Traceability](https://banes-lab.com/records/lex/event-storm-traceability.md)

Conflicts with
[Direct Event Handler Calls](https://banes-lab.com/records/lex/direct-event-handler-calls.md)

Tensions
[Event Bus Event Storm / Traceability](https://banes-lab.com/records/tension/event-bus-event-storm-traceability.md)

Violated by
hidden implicit event dependencies

Detected by
undocumented subscribers

Measured by
event dependency visibility

Refactored by
Introduce Event Bus, Register Handlers

Enforced by
handler registry validation

Before

```typescript
fooEditor.onSave = foo => fooView.refresh(foo);
fooEditor.onDelete = id => fooView.remove(id);
```

After

```typescript
eventBus.emit({ type: "FooSaved", foo });
eventBus.emit({ type: "FooDeleted", fooId: id });
eventBus.on("FooSaved", event => fooView.refresh(event.foo));
```

### Event Stream

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Severity: contextual
- Scope: stream processing, integration
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Ordered Log](https://banes-lab.com/records/lex/ordered-log.md), [Event Schema](https://banes-lab.com/records/lex/event-schema.md)

Reinforces
[Streaming Architecture](https://banes-lab.com/records/arch/streaming-architecture.md)

Enables
[Replay](https://banes-lab.com/records/lex/replay.md), [Continuous Processing](https://banes-lab.com/records/lex/continuous-processing.md)

In tension with
[Storage Volume](https://banes-lab.com/records/lex/storage-volume.md)

Conflicts with
[Mutable State Only](https://banes-lab.com/records/lex/mutable-state-only.md)

Referenced by
[Streaming Architecture](https://banes-lab.com/records/arch/streaming-architecture.md)

Tensions
[Event Stream Storage Volume](https://banes-lab.com/records/tension/event-stream-storage-volume.md)

Violated by
non-replayable event processing

Detected by
missing offsets, missing event schema

Measured by
replay success, lag

Refactored by
Add Stream, Add Offset Tracking

Enforced by
stream contract tests

Before

```typescript
const latest = await fooApi.getCurrentState(fooId);
```

After

```typescript
const stream = fooEvents.stream(fooId);
for await (const event of stream) fooProjection.apply(event);
```

### Event Sourcing

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: domain, persistence
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Append-Only Log](https://banes-lab.com/records/arch/append-only-log.md), [Domain Events](https://banes-lab.com/records/arch/domain-events.md)

Reinforces
[Auditability](https://banes-lab.com/records/arch/auditability.md), [Temporal Modeling](https://banes-lab.com/records/lex/temporal-modeling.md)

Enables
[Replay](https://banes-lab.com/records/lex/replay.md), [Historical Reconstruction](https://banes-lab.com/records/lex/historical-reconstruction.md)

In tension with
[Query Complexity](https://banes-lab.com/records/lex/query-complexity.md)

Conflicts with
[CRUD-Only State Persistence](https://banes-lab.com/records/lex/crud-only-state-persistence.md)

Referenced by
[Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md), [CQRS](https://banes-lab.com/records/arch/command-query-responsibility-segregation.md), [Append-Only Log](https://banes-lab.com/records/arch/append-only-log.md)

Tensions
[Event Sourcing Query Complexity](https://banes-lab.com/records/tension/event-sourcing-query-complexity.md)

Violated by
mutating state without event record

Detected by
state changes lacking events

Measured by
event/state consistency

Refactored by
Persist Events, Build Projections

Enforced by
event append rules

Before

```typescript
type FooRow = { id: FooId; name: string; status: string };
await fooTable.update(foo);
```

After

```typescript
type FooEvent = FooCreated | FooRenamed | FooClosed;
await fooEventStore.append(foo.id, foo.uncommittedEvents());
const foo = fooEventStore.read(fooId).reduce(applyFooEvent, emptyFoo());
```

### CQRS

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: application, data access
- Aliases: CQRS
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Command/Query Separation](https://banes-lab.com/records/lex/command-query-separation.md)

Reinforces
[Scalability](https://banes-lab.com/records/arch/scalability.md), [Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md)

Enables
[Read/Write Model Optimization](https://banes-lab.com/records/lex/read-write-model-optimization.md)

In tension with
[Eventual Consistency](https://banes-lab.com/records/arch/eventual-consistency.md)

Conflicts with
[Unified CRUD Model](https://banes-lab.com/records/lex/unified-crud-model.md)

Referenced by
[Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

Tensions
[CQRS Eventual Consistency](https://banes-lab.com/records/tension/cqrs-eventual-consistency.md)

Violated by
queries mutating state, commands returning complex read models

Detected by
command/query side-effect violations

Measured by
read/write separation compliance

Refactored by
Split Command and Query Models

Enforced by
handler conventions, [tests](https://banes-lab.com/records/lex/tests.md)

Before

```typescript
class FooRepository {
save(foo: Foo) {}
search(query: string): Foo[] { return complexJoin(query); }
}
```

After

```typescript
class FooCommandStore { save(foo: Foo) { return fooDb.write(foo); } }
class FooQueryStore { search(query: string) { return fooReadModel.search(query); } }
commandBus.execute(new SaveFoo(foo));
queryBus.execute(new SearchFoos(query));
```

### Domain Events

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: domain, bounded context
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Domain Model](https://banes-lab.com/records/arch/domain-model.md), [Event Semantics](https://banes-lab.com/records/lex/event-semantics.md)

Reinforces
[Domain-Driven Design (DDD)](https://banes-lab.com/records/arch/domain-driven-design.md), [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

Enables
[Decoupled Domain Reactions](https://banes-lab.com/records/lex/decoupled-domain-reactions.md)

In tension with
[Event Granularity](https://banes-lab.com/records/lex/event-granularity.md)

Conflicts with
[Infrastructure Events in Domain](https://banes-lab.com/records/lex/infrastructure-events-in-domain.md)

Referenced by
[Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md)

Tensions
[Domain Events Event Granularity](https://banes-lab.com/records/tension/domain-events-event-granularity.md)

Violated by
events named after technical operations only

Detected by
CRUD-named domain events

Measured by
semantic event quality

Refactored by
Rename Event, Emit from Aggregate

Enforced by
domain review

Before

```typescript
class Foo {
rename(name: string) { this.name = name; }
}
```

After

```typescript
class Foo {
#events: FooDomainEvent[] = [];
rename(name: string) {
this.name = name;
this.#events.push({ type: "FooRenamed", fooId: this.id, name });
}
}
```

### Integration Events

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: service boundary, messaging
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Contract](https://banes-lab.com/records/lex/message-contract.md), [Versioning](https://banes-lab.com/records/arch/versioning.md)

Reinforces
[Interoperability](https://banes-lab.com/records/arch/interoperability.md)

Enables
[Cross-Service Communication](https://banes-lab.com/records/lex/cross-service-communication.md)

In tension with
[Duplication with Domain Events](https://banes-lab.com/records/lex/duplication-with-domain-events.md)

Conflicts with
[Internal Domain Event Leakage](https://banes-lab.com/records/lex/internal-domain-event-leakage.md)

Tensions
[Integration Events Duplication with Domain Events](https://banes-lab.com/records/tension/duplication-with-domain-events-integration-events.md)

Violated by
exposing internal domain events directly to external consumers

Detected by
internal event schema published externally

Measured by
boundary event contract coverage

Refactored by
Map Domain Event to Integration Event

Enforced by
event schema review

Before

```typescript
barService.consume(fooDomainEvent);
```

After

```typescript
const integrationEvent: FooCreatedV1 = {
type: "com.example.foo-created.v1",
fooId: event.fooId,
occurredAt: clock.now().toISOString(),
};
integrationBus.publish(integrationEvent);
```

### Asynchronous Communication

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: contextual
- Scope: service, system
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Contract](https://banes-lab.com/records/lex/message-contract.md), [Retry Safety](https://banes-lab.com/records/lex/retry-safety.md)

Reinforces
[Resilience](https://banes-lab.com/records/arch/resilience.md), [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)

Enables
[Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

In tension with
[Immediate Consistency](https://banes-lab.com/records/lex/immediate-consistency.md)

Conflicts with
[Blocking Synchronous Chains](https://banes-lab.com/records/lex/blocking-synchronous-chains.md), [Synchronous Chain Trap](https://banes-lab.com/records/arch/synchronous-chain-trap.md)

Referenced by
[Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)

Tensions
[Asynchronous Communication Immediate Consistency](https://banes-lab.com/records/tension/asynchronous-communication-immediate-consistency.md)

Violated by
synchronous call chain for non-immediate work

Detected by
long blocking chains

Measured by
sync dependency depth

Refactored by
Introduce Queue/Event, Add Callback/Projection

Enforced by
[architecture review](https://banes-lab.com/records/arch/architecture-review.md)

Before

```typescript
const bar = await barService.createFromFoo(foo);
const baz = await bazService.createFromBar(bar);
```

After

```typescript
await outbox.append({ type: "FooCreated", fooId: foo.id });
return { accepted: true, fooId: foo.id };
```

### Service Autonomy

- Kind: [principle](https://banes-lab.com/records/kind/principle.md)
- Severity: contextual
- Scope: service, bounded context
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Own Data](https://banes-lab.com/records/lex/own-data.md), [Explicit Contracts](https://banes-lab.com/records/arch/explicit-contracts.md)

Reinforces
[Microservices](https://banes-lab.com/records/arch/microservices.md), [Independence](https://banes-lab.com/records/arch/independence.md)

Enables
[Independent Deployment](https://banes-lab.com/records/lex/independent-deployment.md)

In tension with
[Global Consistency](https://banes-lab.com/records/lex/global-consistency.md)

Conflicts with
[Shared Database](https://banes-lab.com/records/lex/shared-database.md), [Cyclic Deployment Dependency](https://banes-lab.com/records/arch/cyclic-deployment-dependency.md)

Referenced by
[Microservices](https://banes-lab.com/records/arch/microservices.md), [Service-Oriented Architecture](https://banes-lab.com/records/arch/service-oriented-architecture.md), [Service Contract](https://banes-lab.com/records/arch/service-contract.md), [Choreography](https://banes-lab.com/records/arch/choreography.md), [Autonomy](https://banes-lab.com/records/arch/autonomy.md)

Tensions
[Service Autonomy Global Consistency](https://banes-lab.com/records/tension/global-consistency-service-autonomy.md)

Violated by
external writes to service-owned data

Detected by
shared schema writes, cross-service table access

Measured by
ownership violation count

Refactored by
Encapsulate Data, Add API/Event Boundary

Enforced by
database permissions, service contracts

Before

```typescript
async function saveFoo(foo: Foo) {
await barDb.verify(foo.barId);
await bazDb.reserve(foo.bazId);
await fooDb.save(foo);
}
```

After

```typescript
async function saveFoo(foo: Foo) {
await fooDb.save(foo);
await outbox.append({ type: "FooSaved", fooId: foo.id, barId: foo.barId, bazId: foo.bazId });
}
```

### Eventual Consistency

- Kind: [model](https://banes-lab.com/records/kind/model.md)
- Severity: contextual
- Scope: distributed system, data
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Idempotency](https://banes-lab.com/records/arch/idempotency.md), [Retry](https://banes-lab.com/records/lex/retry.md), [Reconciliation](https://banes-lab.com/records/lex/reconciliation.md)

Reinforces
[Availability](https://banes-lab.com/records/lex/availability.md), [Scalability](https://banes-lab.com/records/arch/scalability.md)

Enables
[Distributed Autonomy](https://banes-lab.com/records/lex/distributed-autonomy.md)

In tension with
[User Expectations](https://banes-lab.com/records/lex/user-expectations.md), [Strong Immediate Consistency](https://banes-lab.com/records/lex/strong-immediate-consistency.md)

Conflicts with
none

Referenced by
[CRDTs](https://banes-lab.com/records/arch/crdts.md), [CAP Theorem](https://banes-lab.com/records/arch/cap-theorem.md), [CQRS](https://banes-lab.com/records/arch/command-query-responsibility-segregation.md), [Saga Pattern](https://banes-lab.com/records/arch/saga-pattern.md), [Idempotent Consumer](https://banes-lab.com/records/arch/idempotent-consumer.md)

Tensions
[Eventual Consistency User Expectations](https://banes-lab.com/records/tension/eventual-consistency-user-expectations.md), [Eventual Consistency Strong Immediate Consistency](https://banes-lab.com/records/tension/eventual-consistency-strong-immediate-consistency.md)

Violated by
assuming immediate cross-service consistency

Detected by
synchronous compensation hacks

Measured by
convergence time, inconsistency window

Refactored by
Add Projection, Add Reconciliation, Add Saga

Enforced by
consistency tests

Before

```typescript
await fooStore.save(foo);
await fooSearch.update(foo);
await fooAnalytics.update(foo);
```

After

```typescript
await fooStore.save(foo);
fooEvents.emit({ type: "FooSaved", foo });
const view = await fooSearchView.find(foo.id);
const converged = view.version >= foo.version;
return { foo: view, converged };
```

### Saga Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: service workflow, distributed system
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Compensating Transactions](https://banes-lab.com/records/lex/compensating-transactions.md), [Idempotency](https://banes-lab.com/records/arch/idempotency.md)

Reinforces
[Eventual Consistency](https://banes-lab.com/records/arch/eventual-consistency.md)

Enables
[Long-Running Transactions](https://banes-lab.com/records/lex/long-running-transactions.md)

In tension with
[Workflow Complexity](https://banes-lab.com/records/lex/workflow-complexity.md)

Conflicts with
[Global ACID Transaction](https://banes-lab.com/records/lex/global-acid-transaction.md)

Referenced by
[Compensating Transaction](https://banes-lab.com/records/arch/compensating-transaction.md)

Tensions
[Saga Pattern Workflow Complexity](https://banes-lab.com/records/tension/saga-pattern-workflow-complexity.md)

Violated by
cross-service transaction requiring atomic database commit

Detected by
distributed transaction attempts

Measured by
compensation coverage

Refactored by
Introduce Saga, Add Compensation

Enforced by
workflow tests

Before

```typescript
const tx = coordinator.begin();
await fooService.prepare(tx, foo);
await barService.prepare(tx, bar);
await bazService.prepare(tx, baz);
await coordinator.commit(tx);
```

After

```typescript
await saga([
{ action: () => fooService.create(foo), compensate: id => fooService.cancel(id) },
{ action: () => barService.create(bar), compensate: id => barService.cancel(id) },
{ action: () => bazService.create(baz), compensate: id => bazService.cancel(id) },
]).run();
```

### Outbox Pattern

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: recommended
- Scope: persistence, messaging
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Local Transaction](https://banes-lab.com/records/lex/local-transaction.md), [Message Relay](https://banes-lab.com/records/lex/message-relay.md)

Reinforces
[Event Reliability](https://banes-lab.com/records/lex/event-reliability.md)

Enables
[Atomic State Change + Message Publish](https://banes-lab.com/records/lex/atomic-state-change-message-publish.md)

In tension with
[Relay Complexity](https://banes-lab.com/records/lex/relay-complexity.md)

Conflicts with
[Dual Write](https://banes-lab.com/records/arch/dual-write.md)

Tensions
[Outbox Pattern Relay Complexity](https://banes-lab.com/records/tension/outbox-pattern-relay-complexity.md)

Violated by
database write followed by direct publish without atomicity

Detected by
dual-write patterns

Measured by
lost-message rate, outbox coverage

Refactored by
Add Outbox Table, Add Relay Worker

Enforced by
persistence rules, integration tests

Before

```typescript
await fooStore.save(foo);
await eventBus.publish({ type: "FooSaved", fooId: foo.id });
```

After

```typescript
await database.transaction(async tx => {
await tx.foos.save(foo);
await tx.outbox.insert({ id: eventId(), type: "FooSaved", fooId: foo.id });
});
await outboxRelay.publishPending();
```

### Compensating Transaction

- Kind: [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- Severity: contextual
- Scope: workflow, distributed transaction
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Reversible/Compensable Step](https://banes-lab.com/records/lex/reversible-compensable-step.md)

Reinforces
[Saga Pattern](https://banes-lab.com/records/arch/saga-pattern.md), [Resilience](https://banes-lab.com/records/arch/resilience.md)

Enables
[Failure Recovery](https://banes-lab.com/records/lex/failure-recovery.md)

In tension with
[Business Complexity](https://banes-lab.com/records/lex/business-complexity.md)

Conflicts with
[Irreversible Side Effects](https://banes-lab.com/records/lex/irreversible-side-effects.md)

Tensions
[Compensating Transaction Business Complexity](https://banes-lab.com/records/tension/business-complexity-compensating-transaction.md)

Violated by
unrecoverable partial workflow failure

Detected by
saga steps without compensation

Measured by
compensation coverage

Refactored by
Add Compensation Action

Enforced by
workflow tests

Before

```typescript
await fooService.create(foo);
await barService.create(bar);
```

After

```typescript
const fooId = await fooService.create(foo);
try {
await barService.create(bar);
} catch (error) {
await fooService.compensateCreate(fooId);
throw error;
}
```

### Append-Only Log

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: event store, audit, stream
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Immutable Events](https://banes-lab.com/records/lex/immutable-events.md)

Reinforces
[Auditability](https://banes-lab.com/records/arch/auditability.md), [Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md)

Enables
[Replay](https://banes-lab.com/records/lex/replay.md), [Temporal Queries](https://banes-lab.com/records/lex/temporal-queries.md)

In tension with
[Storage Growth](https://banes-lab.com/records/lex/storage-growth.md)

Conflicts with
[In-Place Mutation](https://banes-lab.com/records/lex/in-place-mutation.md)

Referenced by
[Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md)

Tensions
[Append-Only Log Storage Growth](https://banes-lab.com/records/tension/append-only-log-storage-growth.md)

Violated by
updating historical records destructively

Detected by
mutable event rows

Measured by
append-only compliance

Refactored by
Append Events, Add Snapshot/Compaction

Enforced by
database constraints

Before

```typescript
fooState.set(foo.id, foo);
fooState.delete(foo.id);
```

After

```typescript
type FooLogEntry = FooCreated | FooUpdated | FooRemoved;
fooLog.append({ seq: nextSeq(), type: "FooRemoved", fooId: foo.id });
const state = projectFooLog(fooLog.read());
```

### Dead-Letter Queue

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: mandatory for production systems
- Scope: service, messaging, resilience
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Queue](https://banes-lab.com/records/arch/message-queue.md)

Reinforces
[Fault Isolation](https://banes-lab.com/records/lex/fault-isolation.md), [Observability](https://banes-lab.com/records/arch/observability.md)

Enables
[Poison-Message Quarantine](https://banes-lab.com/records/lex/poison-message-quarantine.md), [Reprocessing After Fix](https://banes-lab.com/records/lex/reprocessing-after-fix.md)

In tension with
[Operational Overhead](https://banes-lab.com/records/lex/operational-overhead.md)

Conflicts with
[Infinite Redelivery Loop](https://banes-lab.com/records/lex/infinite-redelivery-loop.md)

Tensions
[Dead-Letter Queue Operational Overhead](https://banes-lab.com/records/tension/dead-letter-queue-operational-overhead.md)

Violated by
unprocessable messages redelivered forever

Detected by
retry storms on a single poison message

Measured by
redelivery count per failed message

Refactored by
Route Failures to a Dead-Letter Queue

Enforced by
messaging design review

Before

```typescript
worker.consume(fooQueue, async message => {
await processFoo(message);
});
```

After

```typescript
worker.consume(fooQueue, async message => {
try {
await processFoo(message);
} catch (error) {
if (message.attempts >= 5) return fooDeadLetterQueue.send(message, error);
throw error;
}
});
```

### Idempotent Consumer

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: mandatory for distributed systems
- Scope: service, messaging, correctness
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Deduplication Key](https://banes-lab.com/records/lex/deduplication-key.md)

Reinforces
[Eventual Consistency](https://banes-lab.com/records/arch/eventual-consistency.md), [At-Least-Once Delivery Safety](https://banes-lab.com/records/lex/at-least-once-delivery-safety.md)

Enables
[Safe Message Redelivery](https://banes-lab.com/records/lex/safe-message-redelivery.md)

In tension with
[State Overhead](https://banes-lab.com/records/lex/state-overhead.md)

Conflicts with
[Duplicate Side Effects](https://banes-lab.com/records/lex/duplicate-side-effects.md)

Tensions
[Idempotent Consumer State Overhead](https://banes-lab.com/records/tension/idempotent-consumer-state-overhead.md)

Violated by
a redelivered message applied twice

Detected by
duplicate effects under at-least-once delivery

Measured by
duplicate-processing incident rate

Refactored by
Make the Consumer Idempotent

Enforced by
messaging design review

Before

```typescript
worker.consume(fooQueue, message => chargeFoo(message.fooId, message.amount));
```

After

```typescript
worker.consume(fooQueue, async message => {
if (await processedMessages.has(message.id)) return;
await chargeFoo(message.fooId, message.amount);
await processedMessages.add(message.id);
});
```

### Competing Consumers

- Kind: [pattern](https://banes-lab.com/records/kind/pattern.md)
- Severity: contextual
- Scope: service, messaging, scalability
- Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)

Details

Requires
[Message Queue](https://banes-lab.com/records/arch/message-queue.md)

Reinforces
[Horizontal Scaling](https://banes-lab.com/records/arch/horizontal-scaling.md), [Load Balancing](https://banes-lab.com/records/arch/load-balancing.md)

Enables
[Parallel Message Processing](https://banes-lab.com/records/lex/parallel-message-processing.md), [Consumer Elasticity](https://banes-lab.com/records/lex/consumer-elasticity.md)

In tension with
[Ordering](https://banes-lab.com/records/lex/ordering.md)

Conflicts with
[Single Serial Consumer](https://banes-lab.com/records/lex/single-serial-consumer.md)

Tensions
[Competing Consumers Ordering](https://banes-lab.com/records/tension/competing-consumers-ordering.md)

Violated by
one consumer serially draining a growing backlog

Detected by
queue depth rising with a single processor

Measured by
consumer utilization vs backlog growth

Refactored by
Scale Out Competing Consumers

Enforced by
messaging design review

Before

```typescript
fooWorker.consume(fooQueue, processFoo);
```

After

```typescript
for (let worker = 0; worker < WORKER_COUNT; worker += 1) {
new FooWorker(worker).consume(fooQueue, processFoo);
}
```

## Links to

- [style](https://banes-lab.com/records/kind/style.md)
- [Execution Core](https://banes-lab.com/records/layer/execution-core.md)
- [Events](https://banes-lab.com/records/lex/events.md)
- [Message Contract](https://banes-lab.com/records/lex/message-contract.md)
- [Idempotency](https://banes-lab.com/records/arch/idempotency.md)
- [Low Coupling](https://banes-lab.com/records/arch/low-coupling.md)
- [Asynchronous Communication](https://banes-lab.com/records/arch/asynchronous-communication.md)
- [Event Sourcing](https://banes-lab.com/records/arch/event-sourcing.md)
- [CQRS](https://banes-lab.com/records/arch/command-query-responsibility-segregation.md)
- [Saga](https://banes-lab.com/records/lex/saga.md)
- [Debuggability](https://banes-lab.com/records/lex/debuggability.md)
- [Strong Consistency](https://banes-lab.com/records/lex/strong-consistency.md)
- [Hidden Temporal Coupling](https://banes-lab.com/records/lex/hidden-temporal-coupling.md)
- [Observer Pattern](https://banes-lab.com/records/arch/observer-pattern.md)
- [Choreography](https://banes-lab.com/records/arch/choreography.md)
- [Event Bus](https://banes-lab.com/records/arch/event-bus.md)
- [Domain Events](https://banes-lab.com/records/arch/domain-events.md)
- [Event-Driven Architecture / Debuggability](https://banes-lab.com/records/tension/debuggability-event-driven-architecture.md)
- [Event-Driven Architecture / Strong Consistency](https://banes-lab.com/records/tension/event-driven-architecture-strong-consistency.md)
- [Retry Safety](https://banes-lab.com/records/lex/retry-safety.md)
- [pattern](https://banes-lab.com/records/kind/pattern.md)
- [Publisher](https://banes-lab.com/records/lex/publisher.md)
- [Subscriber](https://banes-lab.com/records/lex/subscriber.md)
- [Broker/Event Bus](https://banes-lab.com/records/lex/broker-event-bus.md)
- [Fan-Out Notification](https://banes-lab.com/records/lex/fan-out-notification.md)
- [Delivery Ordering](https://banes-lab.com/records/lex/delivery-ordering.md)
- [Direct Point-to-Point Calls](https://banes-lab.com/records/lex/direct-point-to-point-calls.md)
- [Publish/Subscribe Pattern / Delivery Ordering](https://banes-lab.com/records/tension/delivery-ordering-publish-subscribe-pattern.md)
- [mechanism](https://banes-lab.com/records/kind/mechanism.md)
- [Consumer](https://banes-lab.com/records/lex/consumer.md)
- [Resilience](https://banes-lab.com/records/arch/resilience.md)
- [Backpressure](https://banes-lab.com/records/arch/backpressure.md)
- [Asynchronous Processing](https://banes-lab.com/records/lex/asynchronous-processing.md)
- [Latency](https://banes-lab.com/records/arch/latency.md)
- [In-Memory Direct Invocation](https://banes-lab.com/records/lex/in-memory-direct-invocation.md)
- [Dead-Letter Queue](https://banes-lab.com/records/arch/dead-letter-queue.md)
- [Competing Consumers](https://banes-lab.com/records/arch/competing-consumers.md)
- [Message Queue / Latency](https://banes-lab.com/records/tension/latency-message-queue.md)
- [artifact](https://banes-lab.com/records/kind/artifact.md)
- [Message Queue/Topics](https://banes-lab.com/records/lex/message-queue-topics.md)
- [Routing](https://banes-lab.com/records/lex/routing.md)
- [Decoupling](https://banes-lab.com/records/lex/decoupling.md)
- [Scalability](https://banes-lab.com/records/arch/scalability.md)
- [Pub/Sub](https://banes-lab.com/records/lex/pub-sub.md)
- [Work Distribution](https://banes-lab.com/records/lex/work-distribution.md)
- [Operational Dependency](https://banes-lab.com/records/lex/operational-dependency.md)
- [Point-to-Point Coupling](https://banes-lab.com/records/lex/point-to-point-coupling.md)
- [Message Broker / Operational Dependency](https://banes-lab.com/records/tension/message-broker-operational-dependency.md)
- [Event Contract](https://banes-lab.com/records/lex/event-contract.md)
- [Subscriber Model](https://banes-lab.com/records/lex/subscriber-model.md)
- [Event-Driven Architecture](https://banes-lab.com/records/arch/event-driven-architecture.md)
- [Decoupled Event Distribution](https://banes-lab.com/records/lex/decoupled-event-distribution.md)
- [Event Storm / Traceability](https://banes-lab.com/records/lex/event-storm-traceability.md)
- [Direct Event Handler Calls](https://banes-lab.com/records/lex/direct-event-handler-calls.md)
- [Event Bus / Event Storm / Traceability](https://banes-lab.com/records/tension/event-bus-event-storm-traceability.md)
- [Ordered Log](https://banes-lab.com/records/lex/ordered-log.md)
- [Event Schema](https://banes-lab.com/records/lex/event-schema.md)
- [Streaming Architecture](https://banes-lab.com/records/arch/streaming-architecture.md)
- [Replay](https://banes-lab.com/records/lex/replay.md)
- [Continuous Processing](https://banes-lab.com/records/lex/continuous-processing.md)
- [Storage Volume](https://banes-lab.com/records/lex/storage-volume.md)
- [Mutable State Only](https://banes-lab.com/records/lex/mutable-state-only.md)
- [Event Stream / Storage Volume](https://banes-lab.com/records/tension/event-stream-storage-volume.md)
- [Append-Only Log](https://banes-lab.com/records/arch/append-only-log.md)
- [Auditability](https://banes-lab.com/records/arch/auditability.md)
- [Temporal Modeling](https://banes-lab.com/records/lex/temporal-modeling.md)
- [Historical Reconstruction](https://banes-lab.com/records/lex/historical-reconstruction.md)
- [Query Complexity](https://banes-lab.com/records/lex/query-complexity.md)
- [CRUD-Only State Persistence](https://banes-lab.com/records/lex/crud-only-state-persistence.md)
- [Event Sourcing / Query Complexity](https://banes-lab.com/records/tension/event-sourcing-query-complexity.md)
- [Command/Query Separation](https://banes-lab.com/records/lex/command-query-separation.md)
- [Read/Write Model Optimization](https://banes-lab.com/records/lex/read-write-model-optimization.md)
- [Eventual Consistency](https://banes-lab.com/records/arch/eventual-consistency.md)
- [Unified CRUD Model](https://banes-lab.com/records/lex/unified-crud-model.md)
- [CQRS / Eventual Consistency](https://banes-lab.com/records/tension/cqrs-eventual-consistency.md)
- [Tests](https://banes-lab.com/records/lex/tests.md)
- [Domain Model](https://banes-lab.com/records/arch/domain-model.md)
- [Event Semantics](https://banes-lab.com/records/lex/event-semantics.md)
- [Domain-Driven Design (DDD)](https://banes-lab.com/records/arch/domain-driven-design.md)
- [Decoupled Domain Reactions](https://banes-lab.com/records/lex/decoupled-domain-reactions.md)
- [Event Granularity](https://banes-lab.com/records/lex/event-granularity.md)
- [Infrastructure Events in Domain](https://banes-lab.com/records/lex/infrastructure-events-in-domain.md)
- [Domain Events / Event Granularity](https://banes-lab.com/records/tension/domain-events-event-granularity.md)
- [Versioning](https://banes-lab.com/records/arch/versioning.md)
- [Interoperability](https://banes-lab.com/records/arch/interoperability.md)
- [Cross-Service Communication](https://banes-lab.com/records/lex/cross-service-communication.md)
- [Duplication with Domain Events](https://banes-lab.com/records/lex/duplication-with-domain-events.md)
- [Internal Domain Event Leakage](https://banes-lab.com/records/lex/internal-domain-event-leakage.md)
- [Integration Events / Duplication with Domain Events](https://banes-lab.com/records/tension/duplication-with-domain-events-integration-events.md)
- [principle](https://banes-lab.com/records/kind/principle.md)
- [Immediate Consistency](https://banes-lab.com/records/lex/immediate-consistency.md)
- [Blocking Synchronous Chains](https://banes-lab.com/records/lex/blocking-synchronous-chains.md)
- [Synchronous Chain Trap](https://banes-lab.com/records/arch/synchronous-chain-trap.md)
- [Asynchronous Communication / Immediate Consistency](https://banes-lab.com/records/tension/asynchronous-communication-immediate-consistency.md)
- [Architecture Review](https://banes-lab.com/records/arch/architecture-review.md)
- [Own Data](https://banes-lab.com/records/lex/own-data.md)
- [Explicit Contracts](https://banes-lab.com/records/arch/explicit-contracts.md)
- [Microservices](https://banes-lab.com/records/arch/microservices.md)
- [Independence](https://banes-lab.com/records/arch/independence.md)
- [Independent Deployment](https://banes-lab.com/records/lex/independent-deployment.md)
- [Global Consistency](https://banes-lab.com/records/lex/global-consistency.md)
- [Shared Database](https://banes-lab.com/records/lex/shared-database.md)
- [Cyclic Deployment Dependency](https://banes-lab.com/records/arch/cyclic-deployment-dependency.md)
- [Service-Oriented Architecture](https://banes-lab.com/records/arch/service-oriented-architecture.md)
- [Service Contract](https://banes-lab.com/records/arch/service-contract.md)
- [Autonomy](https://banes-lab.com/records/arch/autonomy.md)
- [Service Autonomy / Global Consistency](https://banes-lab.com/records/tension/global-consistency-service-autonomy.md)
- [model](https://banes-lab.com/records/kind/model.md)
- [Retry](https://banes-lab.com/records/lex/retry.md)
- [Reconciliation](https://banes-lab.com/records/lex/reconciliation.md)
- [Availability](https://banes-lab.com/records/lex/availability.md)
- [Distributed Autonomy](https://banes-lab.com/records/lex/distributed-autonomy.md)
- [User Expectations](https://banes-lab.com/records/lex/user-expectations.md)
- [Strong Immediate Consistency](https://banes-lab.com/records/lex/strong-immediate-consistency.md)
- [CRDTs](https://banes-lab.com/records/arch/crdts.md)
- [CAP Theorem](https://banes-lab.com/records/arch/cap-theorem.md)
- [Saga Pattern](https://banes-lab.com/records/arch/saga-pattern.md)
- [Idempotent Consumer](https://banes-lab.com/records/arch/idempotent-consumer.md)
- [Eventual Consistency / User Expectations](https://banes-lab.com/records/tension/eventual-consistency-user-expectations.md)
- [Eventual Consistency / Strong Immediate Consistency](https://banes-lab.com/records/tension/eventual-consistency-strong-immediate-consistency.md)
- [Compensating Transactions](https://banes-lab.com/records/lex/compensating-transactions.md)
- [Long-Running Transactions](https://banes-lab.com/records/lex/long-running-transactions.md)
- [Workflow Complexity](https://banes-lab.com/records/lex/workflow-complexity.md)
- [Global ACID Transaction](https://banes-lab.com/records/lex/global-acid-transaction.md)
- [Compensating Transaction](https://banes-lab.com/records/arch/compensating-transaction.md)
- [Saga Pattern / Workflow Complexity](https://banes-lab.com/records/tension/saga-pattern-workflow-complexity.md)
- [Local Transaction](https://banes-lab.com/records/lex/local-transaction.md)
- [Message Relay](https://banes-lab.com/records/lex/message-relay.md)
- [Event Reliability](https://banes-lab.com/records/lex/event-reliability.md)
- [Atomic State Change + Message Publish](https://banes-lab.com/records/lex/atomic-state-change-message-publish.md)
- [Relay Complexity](https://banes-lab.com/records/lex/relay-complexity.md)
- [Dual Write](https://banes-lab.com/records/arch/dual-write.md)
- [Outbox Pattern / Relay Complexity](https://banes-lab.com/records/tension/outbox-pattern-relay-complexity.md)
- [Reversible/Compensable Step](https://banes-lab.com/records/lex/reversible-compensable-step.md)
- [Failure Recovery](https://banes-lab.com/records/lex/failure-recovery.md)
- [Business Complexity](https://banes-lab.com/records/lex/business-complexity.md)
- [Irreversible Side Effects](https://banes-lab.com/records/lex/irreversible-side-effects.md)
- [Compensating Transaction / Business Complexity](https://banes-lab.com/records/tension/business-complexity-compensating-transaction.md)
- [Immutable Events](https://banes-lab.com/records/lex/immutable-events.md)
- [Temporal Queries](https://banes-lab.com/records/lex/temporal-queries.md)
- [Storage Growth](https://banes-lab.com/records/lex/storage-growth.md)
- [In-Place Mutation](https://banes-lab.com/records/lex/in-place-mutation.md)
- [Append-Only Log / Storage Growth](https://banes-lab.com/records/tension/append-only-log-storage-growth.md)
- [Message Queue](https://banes-lab.com/records/arch/message-queue.md)
- [Fault Isolation](https://banes-lab.com/records/lex/fault-isolation.md)
- [Observability](https://banes-lab.com/records/arch/observability.md)
- [Poison-Message Quarantine](https://banes-lab.com/records/lex/poison-message-quarantine.md)
- [Reprocessing After Fix](https://banes-lab.com/records/lex/reprocessing-after-fix.md)
- [Operational Overhead](https://banes-lab.com/records/lex/operational-overhead.md)
- [Infinite Redelivery Loop](https://banes-lab.com/records/lex/infinite-redelivery-loop.md)
- [Dead-Letter Queue / Operational Overhead](https://banes-lab.com/records/tension/dead-letter-queue-operational-overhead.md)
- [Deduplication Key](https://banes-lab.com/records/lex/deduplication-key.md)
- [At-Least-Once Delivery Safety](https://banes-lab.com/records/lex/at-least-once-delivery-safety.md)
- [Safe Message Redelivery](https://banes-lab.com/records/lex/safe-message-redelivery.md)
- [State Overhead](https://banes-lab.com/records/lex/state-overhead.md)
- [Duplicate Side Effects](https://banes-lab.com/records/lex/duplicate-side-effects.md)
- [Idempotent Consumer / State Overhead](https://banes-lab.com/records/tension/idempotent-consumer-state-overhead.md)
- [Horizontal Scaling](https://banes-lab.com/records/arch/horizontal-scaling.md)
- [Load Balancing](https://banes-lab.com/records/arch/load-balancing.md)
- [Parallel Message Processing](https://banes-lab.com/records/lex/parallel-message-processing.md)
- [Consumer Elasticity](https://banes-lab.com/records/lex/consumer-elasticity.md)
- [Ordering](https://banes-lab.com/records/lex/ordering.md)
- [Single Serial Consumer](https://banes-lab.com/records/lex/single-serial-consumer.md)
- [Competing Consumers / Ordering](https://banes-lab.com/records/tension/competing-consumers-ordering.md)

## Linked from

- [The layer topology](https://banes-lab.com/ontology/schema/the-layer-topology.md)
- [The membership](https://banes-lab.com/ontology/schema/the-membership.md)
