Skip to content

[Feature]: CommunityToolkit.Aspire.Hosting.Floci — Service Bus connection string helper for AddFlociAzure #1552

Description

@thomhurst

Package

CommunityToolkit.Aspire.Hosting.Floci

Is your feature request related to a problem? Please describe.

AddFlociAzure(...) injects a ready-to-use AZURE_STORAGE_CONNECTION_STRING for the storage SDKs, and a Cosmos connection-string helper is proposed in #1545 (PR #1546). There is no equivalent for Service Bus, so a .NET app cannot reach floci-az Service Bus through the standard Aspire connection-string flow (builder.AddAzureServiceBusClient("servicebus")) at all.

Unlike Blob/Cosmos, this is not just a missing helper: floci-az's Service Bus AMQP data plane terminates on an Artemis sidecar container that floci-az spawns itself at runtime — the Aspire-modeled resource is only the main container, so there is no EndpointReference to build a connection string from. Filed upstream as floci-io/floci-az#249; this issue tracks the toolkit half.

Describe the solution you'd like

Once floci-az exposes a modelable AMQP endpoint (floci-io/floci-az#249), add a WithServiceBusReference helper mirroring the storage/Cosmos pattern:

var azure = builder.AddFlociAzure("floci-az");

builder.AddProject<Projects.Api>("api")
    .WithServiceBusReference(azure)      // connectionName defaults to "servicebus"
    .WaitFor(azure);

Injecting (endpoint resolved by Aspire so it tracks random/isolated ports):

ConnectionStrings__servicebus = Endpoint=sb://{host}:{amqpPort};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;

With its own [AspireExport] TS binding, following the shape of withFlociAzureCosmosReference in #1546.

Blocked by floci-io/floci-az#249 — until the AMQP port is declarable on the modeled container, the helper has nothing to reference.

Additional context

I'm happy to contribute the PR once the upstream endpoint exists (as with #1546).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions