# AddActiveMQ

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

Adds a ActiveMQ container to the application model.

## Remarks

The default image and tag are "apache/activemq-classic" and "6.1.7".

## Definition

```go
func (DistributedApplicationBuilder) AddActiveMQ(
    name string,
    options ...*AddActiveMQOptions,
) ActiveMQServerResource
```

## Parameters

- `name` (`string`) -- The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- `options` (`...*AddActiveMQOptions`) -- optional settings, see [Options](#options)

## Options

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

- `UserName` (`*ParameterResource`) -- The parameter used to provide the username for the ActiveMQ resource. If `null` a default value will be used.
- `Password` (`*ParameterResource`) -- The parameter used to provide the password for the ActiveMQ resource. If `null` a random password will be generated.
- `Port` (`*float64`) -- The host port that the underlying container is bound to when running locally.
- `Scheme` (`*string`) -- The scheme of the endpoint, e.g. tcp or activemq (for masstransit). Defaults to tcp.
- `WebPort` (`*float64`) -- The host port that the underlying webconsole is bound to when running locally.

## Returns

[`ActiveMQServerResource`](/reference/api/go/communitytoolkit.aspire.hosting.activemq/activemqserverresource.md) -- A reference to the `IResourceBuilder`.

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

## Applies to

- `DistributedApplicationBuilder`
