Welcome Azure ServiceBus JavaScript SDK

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Few days ago we released JavaScript SDK for Azure Service Bus. Service Bus originally has always supported REST protocol to manage the service and to
implement messaging for Queue and Topics. However, if you ever tried to use natively REST to talk to SB (and most other services) you will probably agree that this is
not an easy task.
In a world of increasing popularity of IoT and other more trivial devices, Service Bus messaging power was mostly
easy adoptable by those enterprise developers who typically leverage JAVA- and .NET –SDK.My idea was to enable SB-power for all major stack by filling up the “JS-gap”. Following picture shows the system, which I have demoed many time in last months.

image

Java Script SDK for Service Bus enables you to send/receive/complete/abandon/peek messages with full CQRS- and SAS-support.
We have published it as open source project on GitHub.

And sure, we provide the NuGet package for it. Following package “Install-Package SbJsSdkSample” will install the required servicebusjssdk-1.0.js and the whole Sample Project which demonstrates how to use it. The best way to start is to create the new ASP.NET empty project and to add SbJsSdkPackage to it.
The package will install the new folder ServiceBusSample.

image

The start file of the project is Index.html. Just start it and you will see following:

image

Notice two test pages. One is “Topic test Page” and another one “Queue test page”. Both are designed dame way.

image
To use it, enter the message in “Message Body” and click send. To peek/receive the message click corresponding buttons.
After the message is received (“Receive-button”) message ID and message body (as string) will appear on the bottom of the page.

If you click “Peek”, message Lock-Token (Message URI) will appear in the middle.

image
This URI will be used when using Complete and Abandon.

If you want to learn how certain actions are implemented, simply click on symbol and we will show the code.
image

Note that the sample uses already provisioned entities which are hold for very short time.

The package for production use is here. https://www.nuget.org/packages/SbJsSdk/

Hope you will like it :)

Damir


Posted Aug 07 2014, 07:57 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.