Hubert Przybylski
Hubert Przybylski

Reputation: 1

Problem with AspireServiceBus and Masstransit

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 enter image description here 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 ?

How to configure MassTransit with this ServiceBusClient or Get proper connection string

Upvotes: 0

Views: 37

Answers (0)

Related Questions