# AddRedPanda

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

Adds a Redpanda container resource to the application. Redpanda is a Kafka API compatible streaming platform, so the resource can be referenced by any Kafka client integration.

## Remarks

This version of the package defaults to the tag of the container image.

## Definition

```go
func (DistributedApplicationBuilder) AddRedPanda(
    name string,
    options ...*AddRedPandaOptions,
) RedPandaServerResource
```

## Parameters

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

## Options

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

- `Port` (`*float64`) -- The host port that the Kafka API is exposed on. If `null` a random port is assigned.

## Returns

[`RedPandaServerResource`](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md) -- A reference to the `IResourceBuilder`.

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

## Applies to

- `DistributedApplicationBuilder`
