PersistentAI API Documentation / @persistentai/fireflow-vfs / server / RedisEventBus
Class: RedisEventBus
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:39
RedisEventBus handles real-time VFS event distribution
This is a "fire and forget" system:
- Events are published to Redis channels
- Subscribers receive events in real-time
- No persistence or acknowledgment (that's what DBOS streams are for)
Constructors
Constructor
new RedisEventBus():
RedisEventBus
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:45
Returns
RedisEventBus
Accessors
isConnected
Get Signature
get isConnected():
boolean
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:196
Check if the event bus is connected
Returns
boolean
Methods
publish()
publish(
event):Promise<void>
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:53
Publish a VFS event to Redis Called from DBOS workflow steps after successful operations
Parameters
event
VFSEvent & object
Returns
Promise<void>
subscribe()
subscribe(
workspaceId,signal?):AsyncGenerator<VFSEventPayload>
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:77
Subscribe to VFS events for a specific workspace Returns an async iterator that yields events
Parameters
workspaceId
string
signal?
AbortSignal
Returns
AsyncGenerator<VFSEventPayload>
subscribeWithCallback()
subscribeWithCallback(
workspaceIds,callback):Promise<() =>Promise<void>>
Defined in: packages/fireflow-vfs/src/redis/event-bus.ts:156
Subscribe to multiple workspaces with a callback Useful for server-side event routing
Parameters
workspaceIds
string[]
callback
(event) => void
Returns
Promise<() => Promise<void>>