How to Receive Notification Through Queue
Get queue information from api Anyone who wants to receive notification from queue needs to get queue details from api mentioned below. API Url : http://devpoc-api-notification-us-e-001-wapp.azurewebsites.net/api/v1/company/queue?cuId=cuid This api will return 2 records with priority[0-Normal, 1- High] queue details. { Example of receive data from queue in C# is as below: using Microsoft.ServiceBus.Messaging; var client = QueueClient.CreateFromConnectionString(connectionString, queueName); //data contains message data. }); NOTE: How to implement or read queue message in other languages(e.g. Java, Node.js, PHP etc) are described on below link:
"data":[
{
"queueName":"<cuid>_high",
"priority":1,
"connectionString":"<high priority queue connection string>"
},
{
"queueName":"<cuid>_normal",
"priority":0,
"connectionString":"<normal priority queue connection string>"
}
],
"count":"2"
}Sample code to receive message from queue
using Newtonsoft.Json.Linq;
using System;
using System.IO;
client.OnMessage(message =>
{
var stream = message.GetBody<Stream>();
var data = JObject.Parse(new StreamReader(stream).ReadToEnd());