# `MqttX.Client.Supervisor`
[🔗](https://github.com/cignosystems/mqttx/blob/v0.9.0/lib/mqttx/client/supervisor.ex#L1)

DynamicSupervisor for managing client connection lifecycles.

Provides supervised client connections with automatic restart on crash.
Use `MqttX.Client.connect_supervised/1` to start connections under this supervisor.

## Example

    {:ok, pid} = MqttX.Client.connect_supervised(
      host: "localhost",
      port: 1883,
      client_id: "my_client"
    )

    # List all supervised connections
    MqttX.Client.list()

    # Look up by client_id
    MqttX.Client.whereis("my_client")

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `count`

```elixir
@spec count() :: map()
```

Count supervised connections.

# `start_child`

```elixir
@spec start_child(keyword()) :: DynamicSupervisor.on_start_child()
```

Start a supervised client connection.

# `start_link`

# `stop_child`

```elixir
@spec stop_child(pid()) :: :ok | {:error, :not_found}
```

Stop a supervised client connection.

# `which_children`

```elixir
@spec which_children() :: [
  {:undefined, pid() | :restarting, :worker | :supervisor, [module()]}
]
```

List supervised connections.

---

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