3
votes

UPDATE: DNX does not exist anymore. Please ignore this question.

Current WindowsAzure.ServiceBus (3.0.4) nuget package (http://nuget-preprod-0-v2gallery.cloudapp.net/packages/WindowsAzure.ServiceBus/) requires .NET Framework 4.5 Full Profile and it is not usable with an application build specifically to use DNX Core.

As I understand, the only way to build such application at this moment is to use REST API.

  1. What is the recommended way to include authentication information to requests? Do we have any open source nuget to handle it or should the SAS token creation be implemented by each developer? Links to the REST API authentication samples are broken.

  2. While the Service Bus nuget package is not open sourced, do we have any active channels to reach the developers to find out if they have any plans to support DNX Core and we should not use REST API because the library update is coming soon?

3
As of December 2016 this answer is no longer current.chadwackerman

3 Answers

2
votes

The REST URL to publish a message on Queue/Topic will be like,

http{s}://{serviceNamespace}.servicebus.windows.net/{queuePath|topicPath}/messages

The authorization SAS Token has to be part of the request header

For further read, REST Run-Time APIs

2
votes

It's also possible by using the AMQP protocol. I recently used AMQP to communicate with an Azure IoTHubClient, all in a DNXCore5.0 project. I used the AMQPNetLite Library to do so, it also has Service Bus Examples!

2
votes

(Reposting as my prior answer was erroneously deleted by the moderators.)

Microsoft now provides a .NET core version of this library. I am shipping a .NET Core app on Linux that calls it.

https://github.com/azure/azure-service-bus-dotnet

Announcement post:

https://blogs.msdn.microsoft.com/servicebus/2016/12/20/service-bus-net-standard-and-open-source/