# Aspire.Hosting.Kafka

- Module: `Aspire.Hosting.Kafka`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `5`
- Types: `2`

## Handles

- [KafkaServerResource](/reference/api/go/aspire.hosting.kafka/kafkaserverresource.md) -- `handle` - 9 members -- A resource that represents a Kafka broker.
- [KafkaUIContainerResource](/reference/api/go/aspire.hosting.kafka/kafkauicontainerresource.md) -- `handle` - 1 members

## Functions

- [AddKafka](/reference/api/go/aspire.hosting.kafka/addkafka.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Kafka resource to the application. A container is used for local development.
- [WithDataBindMount](/reference/api/go/aspire.hosting.kafka/withdatabindmount.md) -- `method` - on `KafkaServerResource` -- Adds a bind mount for the data folder to a Kafka container resource.
- [WithDataVolume](/reference/api/go/aspire.hosting.kafka/withdatavolume.md) -- `method` - on `KafkaServerResource` -- Adds a named volume for the data folder to a Kafka container resource.
- [WithKafkaUI](/reference/api/go/aspire.hosting.kafka/withkafkaui.md) -- `method` - on `KafkaServerResource` -- Adds a Kafka UI container to the application.
- [WithHostPort](/reference/api/go/aspire.hosting.kafka/withhostport.md) -- `method` - on `KafkaUIContainerResource` -- Configures the host port that the KafkaUI resource is exposed on instead of using randomly assigned port.
