In-Memory Adapter
Overview
The in-memory adapter stores events entirely in process memory. It requires no external dependencies or file paths — just set the type and start writing events.
Supported Features
| Feature | Supported |
|---|---|
| Event Store | Yes |
| Read Model | — |
| Policy DLQ | — |
| Process Manager DLQ | — |
| Scheduling | — |
When to Use
- Unit tests — Fast setup with no teardown needed. Each test run starts with a clean slate.
- Development — Rapid iteration without managing database files or connections.
- Prototyping — Validate domain logic before committing to a persistence strategy.
Note: All data is lost when the process restarts. Do not use this adapter for production workloads that require durability.
Configuration
import type { Config } from "@bounda-dev/config";
export default {
domain: {
order: {
eventStore: { type: "in-memory" },
},
},
read: {},
} satisfies Config;
The in-memory adapter accepts no additional options beyond type.
Related
- Adapters Overview — Comparison of all available adapters
- SQLite — Persistent alternative for local development
- Configuration Reference — Full config reference