> ## Documentation Index
> Fetch the complete documentation index at: https://abxbus.archivebox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# WALEventBusMiddleware

> Persist completed events to a JSONL write-ahead log.

`WALEventBusMiddleware` appends completed event snapshots to a JSONL file.

## Constructor params

* `wal_path`: filesystem path for append-only JSONL output

## Setup with EventBus

> [tab] Python
>
> ```python theme={null}
> from abxbus import EventBus
> from abxbus.middlewares import WALEventBusMiddleware
>
> bus = EventBus(
>     name='AppBus',
>     middlewares=[WALEventBusMiddleware('./events.jsonl')],
> )
> ```

> [tab] Rust
>
> ```rust theme={null}
> // Not implemented in the Rust crate yet.
> // Use explicit typed handler wrappers around bus.on(...) for this behavior for now.
> ```

## Behavior

* Writes one JSON line per completed event.
* Uses internal locking for thread-safe file appends.
* Creates parent directories automatically.
* Intended for replay/debug/audit workflows.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.