Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

KafkaServerResource

Handle
📦 Aspire.Hosting.Kafka v17.0.0

A resource that represents a Kafka broker.

type KafkaServerResource interface {
ExpressionValue
IComputeResource
Resource
ResourceWithArgs
ResourceWithConnectionString
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the Kafka broker.
ConnectionStringExpression() *ReferenceExpression
propertyHostEndpointReferenceExpressionget
Gets the host endpoint reference for the primary endpoint.
Host() EndpointReferenceExpression
propertyInternalEndpointEndpointReferenceget
Gets the internal endpoint for the Kafka broker. This endpoint is used for container to broker communication. To connect to the Kafka broker from a host process, use PrimaryEndpoint.
InternalEndpoint() EndpointReference
propertyPortEndpointReferenceExpressionget
Gets the port endpoint reference for the primary endpoint.
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Kafka broker. This endpoint is used for host processes to Kafka broker communication. To connect to the Kafka broker from a container, use InternalEndpoint.
PrimaryEndpoint() EndpointReference
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)

Methods

methodWithDataBindMountbuilder
Adds a bind mount for the data folder to a Kafka container resource.
WithDataBindMount(
source string,
options ...*WithDataBindMountOptions,
) KafkaServerResource
sourcestringThe source directory on the host to mount into the container.
options...*WithDataBindMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataBindMountOptions argument.

IsReadOnly*boolA flag that indicates if this is a read-only mount.
KafkaServerResource

The resource builder.

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

methodWithDataVolumebuilder
Adds a named volume for the data folder to a Kafka container resource.
WithDataVolume(options ...*WithDataVolumeOptions) KafkaServerResource
options...*WithDataVolumeOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataVolumeOptions argument.

Name*stringThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
IsReadOnly*boolA flag that indicates if this is a read-only volume.
KafkaServerResource

The resource builder.

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

methodWithKafkaUIbuilder
Adds a Kafka UI container to the application.
WithKafkaUI(options ...*WithKafkaUIOptions) KafkaServerResource
options...*WithKafkaUIOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithKafkaUIOptions argument.

ConfigureContainerfunc(obj KafkaUIContainerResource)callbackConfiguration callback for KafkaUI container resource.
ContainerName*stringThe name of the container (Optional).
KafkaServerResource

The resource builder.

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