Skip to content

Routing

InboundRoomRouter

Bases: ABC

Route an inbound message to a room (or None for auto-create).

route abstractmethod async

route(channel_id, channel_type, participant_id=None, channel_data=None)

Return room_id for the message, or None to create a new room.

DefaultInboundRoomRouter

DefaultInboundRoomRouter(store)

Bases: InboundRoomRouter

Default router (RFC §10.4): by participant, then by a single binding.

Returns None rather than choosing when the message could belong to more than one room. A new room is recoverable; a message delivered into someone else's conversation is not — it is stored there, broadcast to that room's channels, and read back as context by that room's agent.