Error Using AzureServiceBusTransport with Microsoft Azure Service Bus Emulator

I am trying to use AzureServiceBusTransport to connect to the Azure Service Bus Emulator that Microsoft now supplies. Info here:

Anyway, The connection string to the Emulator, which is a local running container is “Endpoint=sb://localhost:5672/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;”

I am getting an error “The value is not a well-formed Service Bus fully qualified namespace. (parameter ‘fullyQualifiedNamespace’)”

Assuming the error is caused because the connection string is not in the format of “//[NAMESPACE].servicebus.windows.net/”

…Is there a way to use this emulator passing in the localhost url, like above?

In its current state, the emulator is suited for unit testing and not a replacement for a fully featured ASB namespace. Suppose you’re attempting to use it for development and running against it. In that case, you’ll need to disable topology creation (disable installer), provide entities description in the configuration file, and use commands only as SQL filters required for pub/sub are unsupported.

More details on the GitHub tracking issue.

1 Like

Thanks for the response and links. I’ll keep an eye on that github issue.

We are using the emulator only for local development. Basically we spin up the emulator as a local docker container and try to use the AzureServiceBus transport type.

The error I am getting seems to not like the connection string I provide. Seen in bold here:

“Endpoint=sb://localhost:5672/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;”

Does the ASB transport connection string require it be in this format?
“//[NAMESPACE].servicebus.windows.net/”

When the emulator container and interacting application are running natively on local machine, use following connection string:
“Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;”

Looks like you have a different connection string from what’s required by the emulator. See documentation here