# AddLavinMQ

- Module: [CommunityToolkit.Aspire.Hosting.LavinMQ](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Adds a LavinMQ container resource to the distributed application builder. Configures the resource with specified parameters and sets up health checks for the resource.

## Definition

```go
func (DistributedApplicationBuilder) AddLavinMQ(
    name string,
    options ...*AddLavinMQOptions,
) LavinMQContainerResource
```

## Parameters

- `name` (`string`) -- The name of the LavinMQ resource.
- `options` (`...*AddLavinMQOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddLavinMQOptions` argument.

- `AmqpPort` (`*float64`) -- The port number for the AMQP protocol. Default is 5672.
- `ManagementPort` (`*float64`) -- The port number for the management interface. Default is 15672.

## Returns

[`LavinMQContainerResource`](/reference/api/go/communitytoolkit.aspire.hosting.lavinmq/lavinmqcontainerresource.md) -- A resource builder for the LavinMQ container resource.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
