Why does NServiceBus on Azure append ".events" to my Topic names?

123 views Asked by At

I have an Azure Topic called "response1" and I would like to subscribe to messages sent to the topic using NServiceBus.

My problem is that instead of subscribing to response1, NServiceBus creates a new Topic on azure called response1.events and subscribes to that. Why does NServiceBus add ".events" to some things? And how do I stop this behavior?

Additional information:

My configuration:

<connectionStrings>
    <add name="NServiceBus/Transport"
        connectionString="Endpoint=sb://[my-namespace].servicebus.windows.net/;SharedSecretIssuer=[issuer];SharedSecretValue=[key]"></add>

</connectionStrings>

Subscription configuration:

<UnicastBusConfig>
    <MessageEndpointMappings>

        <add Assembly="Messages" Type="Messages.TheResponse" Endpoint="response1"/>

    </MessageEndpointMappings>
</UnicastBusConfig>

And my bus configuration in code (console application):

static void Main(string[] args)
    {
        Console.WriteLine("Subscribing...");

        BusConfiguration busConfiguration = new BusConfiguration();
        busConfiguration.UseTransport<AzureServiceBusTransport>();
        busConfiguration.UsePersistence<InMemoryPersistence>();

        Console.WriteLine("Configuring bus...");
        bus = NServiceBus.Bus.Create(busConfiguration).Start();

        Console.WriteLine("Done. Press Enter to Exit.");
        Console.ReadLine();
    }
1

There are 1 answers

1
Yves Goeleven On BEST ANSWER

See Why does NServiceBus on Azure not use my specified endpoint name?

Nsb has been designed not do this, business endpoints can only subscribe to other business endpoints, not to stand alone technical constructs like topics.

PS: if this is related to your integration question, and your intend is to publish to a native topic not associated to an business endpoint, then you can do it the same way as done in the integration sample