Skip to content
DocsTry Aspire
DocsTry

KafkaServerResource

Handle
📦 Aspire.Hosting.Kafka v13.4.0
interface KafkaServerResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
readonly internalEndpoint: EndpointReference;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
withDataBindMount(
source: string,
isReadOnly?: boolean): KafkaServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): KafkaServerResource;
withKafkaUI(configureContainer?: (obj: KafkaUIContainerResource) => Promise<void>, containerName?: string): KafkaServerResource;
}

Properties

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the Kafka broker.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for the primary endpoint.
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`.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for the primary endpoint.
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`.

Methods

methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a Kafka container resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): KafkaServerResource
sourcestring
isReadOnlybooleanoptional= False
KafkaServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a Kafka container resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): KafkaServerResource
namestringoptional
isReadOnlybooleanoptional= False
KafkaServerResource
methodwithKafkaUIbuilder
Adds a Kafka UI container to the application.
withKafkaUI(configureContainer?: (obj: KafkaUIContainerResource) => Promise<void>, containerName?: string): KafkaServerResource
configureContainer(obj: KafkaUIContainerResource) => Promise<void>optional
containerNamestringoptional
KafkaServerResource