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:
Then, I moved on to REST.
https://azure.microsoft.com/en-gb/documentation/articles/service-bus-brokered-tutorial-rest/ 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.
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.
Bonus: the sample linked to in the documentation for the REST API, e.g. from https://msdn.microsoft.com/en-US/library/azure/hh780786.aspx, no longer exists.
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?
Service Bus supports standard Advanced Message Queuing Protocol (AMQP) 1.0 and HTTP/REST protocols. For more information about these features, see Advanced features of Azure Service Bus.
A topic subscription resembles a virtual queue that receives copies of the messages that are sent to the topic. Consumers receive messages from a subscription identically to the way they receive messages from a queue.
Still there's not sufficient support for OnMessage
implementation which I think the-most important thing in ServiceBus, .Net Core version of ServiceBus was rolled out several days ago.
Receive message example for .Net Core > https://github.com/Azure/azure-service-bus-dotnet/tree/b6f0474429efdff5960cab7cf18031ba2cbbbf52/samples/ReceiveSample
Github project link > https://github.com/Azure/azure-service-bus-dotnet
And, nuget information > https://www.nuget.org/packages/Microsoft.Azure.Management.ServiceBus/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With