title: Azure Service Bus - topics, messages - using .NET Core
body: <p>I'm trying to use Azure Service Bus with .NET Core.  Obviously at the moment, this kind of sucks.  I have tried the following routes:</p>
  
  <ol>
  <li>The official SDK: doesn't work with .NET Core</li>
  <li>AMQP.Net Lite: no (decent) documentation, no management APIs around creating/listing topics, etc.  Only Service Bus examples cover a small subset of functionality and need you to have a topic already, etc</li>
  <li>The community wrapper around AMQP.Net Lite which mirrors the Azure SDK (<a href="https://github.com/ppatierno/azuresblite">https://github.com/ppatierno/azuresblite</a>): doesn't work with .NET Core</li>
  </ol>
  
  <p>Then, I moved on to REST.</p>
  
  <p><a href="https://azure.microsoft.com/en-gb/documentation/articles/service-bus-brokered-tutorial-rest/">https://azure.microsoft.com/en-gb/documentation/articles/service-bus-brokered-tutorial-rest/</a> is a good start (although no RestSharp support for .NET Core either, and for some reason the official SDK doesn't seem to cover a REST client - no Swagger def, no AutoRest client, etc).  Although this crappy example concatenates strings into XML without encoding, and covers a small subset of functionality.</p>
  
  <p>So I decided to look for REST documentation.  There are two sections, "classic" REST and just REST.  Plain-old new REST doesn't support actually sending and receiving messages it seems (...huh?).  I'm loathed to use an older technology labelled "classic" unless I can understand what it is - of course, docs are no help here.  It also uses XML and ATOM rather than JSON.  I have no idea why.</p>
  
  <p>Bonus: the sample linked to in the documentation for the REST API, e.g. from <a href="https://msdn.microsoft.com/en-US/library/azure/hh780786.aspx">https://msdn.microsoft.com/en-US/library/azure/hh780786.aspx</a>, no longer exists.</p>
  
  <p>Are there any viable approaches anyone has managed to use to read/write messages to topics/from subscriptions with Azure Service Bus and .NET Core?</p>