Room Configuration
Rooms are defined in the DialogueConfig.rooms object, keyed by room ID.
Basic Room Configuration
Room Configuration Options
Bounded Rooms
Limit concurrent connections for predictable scaling:
When a room is full, new clients receive a dialogue:error event with code ROOM_FULL.
Default Subscriptions
Auto-subscribe clients to specific events when they join:
Event Control Patterns
Accept All Events (Wildcard):
To create a room that accepts any event type, use the wildcard "*":
Reject All Events (Empty Array):
To create a room that rejects all trigger attempts (listen-only or system-controlled):
How it works:
events: []- No events allowed (all triggers rejected)events: [{ name: '*' }]- All events allowed (no validation)events: [specificEvent1, specificEvent2]- Only listed events alloweddefaultSubscriptions: ['*']- Clients auto-subscribe to all events when joining
Use cases:
- Wildcard (
*): Chat rooms, debug channels, flexible communication - Empty array (
[]): Read-only rooms, server-only broadcasting - Specific events: Most production use cases with validated schemas
Warning: Wildcard rooms bypass event validation. Use with caution in production.
See Also
- Event Definitions - Defining events for rooms
- Lifecycle Hooks - Room access control with beforeJoin hook
- Dialogue Configuration - Full configuration example