Skip to content

Help with configure ServiceBus and MassTransit #7427

Open
@huberttrueselftrueme

Description

@huberttrueselftrueme

Hello.

In my Aspire project i have

var serviceBus = builder.ExecutionContext.IsPublishMode ? builder.AddAzureServiceBus(OrchestrationResources.ServiceBus) : builder.AddConnectionString(OrchestrationResources.ServiceBus);

For my local envirement it aspire appsetting.json i have

  "ConnectionStrings": {
"servicebus":"Endpoint=sb://*******~*******.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*******~*******"}

And then
Image
Everything works.

But when i deploy to azure connection string changes to format https://~.servicebus.windows.net:443/ and application crash.

I am reading documentation i am lost how to do this. there is information that i should add builder.AddAzureServiceBusClient(ApplicationConstants.ConnectionStrings.ServiceBus); to get ServiceBusClient

but it give me nothing because there is no Host that accept this clinet.
The closed is :

public static void Host(this IServiceBusBusFactoryConfigurator configurator, Uri hostAddress,
            ServiceBusClient serviceBusClient, ServiceBusAdministrationClient serviceBusAdministrationClient)

Can any body help me with this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions