# `Jido.Messaging.RoomSupervisor`
[🔗](https://github.com/agentjido/jido_messaging/blob/v1.0.0/lib/jido_messaging/room_supervisor.ex#L1)

DynamicSupervisor for spawning and managing RoomServer processes.

Each Jido.Messaging instance has its own RoomSupervisor that manages
room servers on-demand.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `count_rooms`

Count running room servers

# `get_or_start_room`

Get an existing room server or start a new one.

Returns `{:ok, pid}` in both cases.

# `list_rooms`

List all running room servers for this instance

# `start_link`

# `start_room`

Start a room server for the given room.

Returns `{:ok, pid}` if started successfully, or `{:error, {:already_started, pid}}`
if the room server is already running.

Options:
- `:message_limit` - Max messages to keep in memory (default: 100)
- `:timeout_ms` - Inactivity timeout (default: 5 minutes)

# `stop_room`

Stop a room server.

Returns `:ok` if stopped, or `{:error, :not_found}` if not running.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
