title: How to use a ServiceBus Trigger with a topic/subscription in an Azure Function
body: <p>I'd like to create an Azure Function that is triggered when a new message is added to a topic/subscription. </p>
  
  <p>For the moment I've created an <a href="https://azure.microsoft.com/en-us/documentation/articles/functions-overview/" rel="nofollow noreferrer">Azure Function</a> using the  <strong>ServiceBusQueueTrigger C# Template</strong> and I've set the Queue Name to</p>
  
  <pre><code>topicPath + "/Subscriptions/" + subscriptionName
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TMktP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TMktP.png" alt="Azure Functions ServiceBusQueueTrigger C# Template"></a></p>
  
  <p>But I've got this exception: </p>
  
  <blockquote>
    <p>Microsoft.ServiceBus: Cannot get entity 'topic-test/Subscriptions/subscription-test' because it is not of type <strong>QueueDescription</strong>. Check that you are using method(s) with the correct entity type. System.Runtime.Serialization: Error in line 1 position 1762. Expecting element 'QueueDescription' from namespace '<a href="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" rel="nofollow noreferrer">http://schemas.microsoft.com/netservices/2010/10/servicebus/connect</a>'.. Encountered 'None' with name '', namespace ''. .</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/iAbkw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iAbkw.png" alt="Failed to create ServiceBusTrigger with Topic/Subscription in an Azure Function"></a></p>
  
  <p>I thought the Azure Function was using the <a href="https://msdn.microsoft.com/en-us/library/azure/hh322642.aspx" rel="nofollow noreferrer">MessagingFactory.CreateMessageReceiver</a> to initialize the message pump but not.</p>
  
  <p>Is there any support for topic/subscription for the moment ?</p>