> ## 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.

# RedisEventBridge

> Forward events via Redis pub/sub channels.

`RedisEventBridge` publishes event payloads to a Redis channel and subscribes for inbound events on the same channel.

## Go support

> [tab] Go
>
> `RedisEventBridge` is not implemented in `abxbus-go` yet. Use [JSONLEventBridge](https://abxbus.archivebox.io/integrations/bridge-jsonl.md) for the currently supported Go bridge.

> [tab] Rust
>
> ```rust theme={null}
> // Not implemented in the Rust crate yet.
> // Use typed event JSON serialization with an external transport for now.
> ```

## Optional dependencies

> [tab] Python
>
> Install the Redis extra (recommended):
>
> ```bash theme={null}
> pip install "abxbus[redis]"
> ```
>
> Equivalent direct dependency install:
>
> ```bash theme={null}
> pip install redis
> ```

> [tab] TypeScript
>
> Install the Redis client package:
>
> ```bash theme={null}
> npm install abxbus ioredis
> ```
>
> This bridge is Node.js-only.

> [tab] Go
>
> ```go theme={null}
> // RedisEventBridge is not implemented in abxbus-go yet.
> // Use JSONLEventBridge for the currently supported Go bridge.
> ```

> [tab] Rust
>
> ```rust theme={null}
> // Not implemented in the Rust crate yet.
> // Use typed events plus EventBus JSON serialization with an external transport for now.
> ```

## Constructor params

* `redis_url`: redis URL in the form `redis://user:pass@host:6379/<db>/<optional_channel>`
* `channel`: optional channel override (defaults to URL channel segment or `abxbus_events`)
* `name`: optional bridge label

> [tab] Python
>
> ```python theme={null}
> from abxbus.bridges import RedisEventBridge
>
> bridge = RedisEventBridge(
>     'redis://user:pass@localhost:6379/1/abxbus_events',
>     name='RedisBridge',
> )
> ```

> [tab] TypeScript
>
> ```ts theme={null}
> import { RedisEventBridge } from 'abxbus/bridges'
>
> const bridge = new RedisEventBridge(
>   'redis://user:pass@localhost:6379/1/abxbus_events',
>   undefined,
>   'RedisBridge'
> )
> ```

> [tab] Go
>
> ```go theme={null}
> // RedisEventBridge is not implemented in abxbus-go yet.
> // Use JSONLEventBridge for Go process-to-process bridge tests and deployments.
> ```

> [tab] Rust
>
> ```rust theme={null}
> // Not implemented in the Rust crate yet.
> // Use typed events plus EventBus JSON serialization with an external transport for now.
> ```

## Setup with a bus

> [tab] Python
>
> ```python theme={null}
> from abxbus import EventBus
> from abxbus.bridges import RedisEventBridge
>
> bus = EventBus('AppBus')
> bridge = RedisEventBridge('redis://localhost:6379/0/abxbus_events')
>
> bus.on('*', bridge.emit)
> bridge.on('*', bus.emit)
> ```

> [tab] TypeScript
>
> ```ts theme={null}
> import { EventBus } from 'abxbus'
> import { RedisEventBridge } from 'abxbus/bridges'
>
> const bus = new EventBus('AppBus')
> const bridge = new RedisEventBridge('redis://localhost:6379/0/abxbus_events')
>
> bus.on('*', bridge.emit)
> bridge.on('*', bus.emit)
> ```

> [tab] Go
>
> ```go theme={null}
> // RedisEventBridge is not implemented in abxbus-go yet.
> // Use JSONLEventBridge for Go process-to-process bridge tests and deployments.
> ```

> [tab] Rust
>
> ```rust theme={null}
> // Not implemented in the Rust crate yet.
> // Use typed events plus EventBus JSON serialization with an external transport for now.
> ```

## Behavior

* `emit(...)` publishes serialized event JSON to the configured Redis channel.
* `on(...)` subscribes handlers for inbound messages and auto-starts the Redis subscriber.
* Incoming messages are parsed into events, reset, then emitted on the bridge's internal bus.
* `close()` unsubscribes and closes Redis clients.
* Runtime requirements: Python needs `redis` (`redis.asyncio`), TypeScript needs `ioredis` and Node.js.


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