Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-channel / dbos

dbos

Examples

typescript
import { DBOSChannel } from '@badaitech/chaingraph-channel/dbos'

// Server 1
const channel = new DBOSChannel<Message>('workflow-123', 'messages')
await channel.send({ type: 'data', value: 42 })

// Server 2 (different server, receives real-time!)
const channel = new DBOSChannel<Message>('workflow-123', 'messages')
for await (const msg of channel) {
  console.log('Received:', msg)
}
typescript
// Global event channel
const events = new DBOSChannel('global', 'system-events')

// Execution A publishes
await events.send({ type: 'deployment', status: 'started' })

// Execution B subscribes (different flow, different server!)
for await (const event of events) {
  console.log('System event:', event)
}

Classes

References

ChannelLogger

Re-exports ChannelLogger


ChannelStats

Re-exports ChannelStats


DBOSChannelConfig

Re-exports DBOSChannelConfig


IChannel

Re-exports IChannel

Licensed under BUSL-1.1