# MosquittoServerResource Constructors

- Package: [CommunityToolkit.Aspire.Hosting.Mosquitto](/reference/api/csharp/communitytoolkit.aspire.hosting.mosquitto.md)
- Type: [MosquittoServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.mosquitto/mosquittoserverresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents a Mosquitto MQTT broker container.

<a id="constructor"></a>
<a id="constructor-string"></a>

## MosquittoServerResource(string)

- Name: `Constructor(string)`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1/src/CommunityToolkit.Aspire.Hosting.Mosquitto/MosquittoServerResource.cs#L12)

A resource that represents a Mosquitto MQTT broker container.

```csharp
public class MosquittoServerResource
{
    public MosquittoServerResource(
        string name)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.

## Remarks

Mosquitto is an open source MQTT message broker. The [MosquittoServerResource.ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.mosquitto/mosquittoserverresource/properties.md#connectionstringexpression) returns a `mqtt://host:port` URI that MQTT clients use to connect.
