title: Dynamic service bus topic subscriptions
body: <p>This question follows on a little from <a href="https://stackoverflow.com/questions/67485730/create-a-azure-service-bus-topic-and-subscription-through-logic-app/67486079#67486079">this</a> - i've a requirement to architect an Azure based document sender app with the following requirements:</p>
  <ol>
  <li>The user can configure multiple endpoints of different types through a web interface (http, file, email) which would send documents to those respective endpoint types (i.e. for http, a webapi endpoint, for file simply copying it to a folder location). Each endpoint will be given a name.</li>
  <li>Each endpoint has to act as a queue - messages (documents) sent to that endpoint need to be processed in order. Messages need to be processed one at a time.</li>
  <li>A message that is 'stuck' for one endpoint (i.e. because the http endpoint its sending to is down) shouldn't block the processing of messages on other endpoints.</li>
  <li>Endpoints can be deleted.</li>
  <li>The details of an endpoint are stored in a SQL database.</li>
  </ol>
  <p>Naturally using an azure service bus queue would facilitate this and i've got some code which creates a topic and subscription through the SB REST Api. The problem arises with the dynamic nature of the endpoints - i can have each endpoint represented as a topic but how can i have a handler for each topic which is created dynamically with a name specified by the user ? Specifically, i can't create a function trigger for a service bus topic because that relies on knowing what the topic name is up front. I thought of having a logic app that contains a trigger handler for each topic (and which calls an azure function) but that also requires knowledge of the topic name. The alternative would be to just have one topic and have multiple filters but would that fulfil the requirements outlined above and seems to not as nice as having multiple topics (not to mention even with filters queries they're essentially based on fixed values ?). So what design would meet these requirements ?</p>