6

For this method:

public static SubscriptionClient CreateFromConnectionString(string connectionString, string topicPath, string name)

What is the topicPath?

MSDN says it is "The full pathname of the topic."

What is the pathname?

There are code examples, but I have yet to find one that explain this little detail.

ChasetopherB
  • 466
  • 9
  • 23

2 Answers2

4

Topic path is the same string that was used as topic's name to create it. See examples here: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-how-to-use-topics-subscriptions

Note ASB names are subject to some limitations: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas

Slava Asipenko
  • 392
  • 1
  • 3
  • In the new `Microsoft.Azure.ServiceBus` libraries, there's now a `EntityNameHelper` class that will create these path names for you. – Rich Jun 22 '20 at 14:20
1

I found this question looking for the path to the subscription. When using a MessageReceiver, the subscription path is:

{topicName}/subscriptions/{subscriptionName}

So for just the topic path it should be simply

{topicName}

Jason Goemaat
  • 122
  • 1
  • 8