

{"id":107925,"date":"2022-02-21T09:00:30","date_gmt":"2022-02-21T03:30:30","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=107925"},"modified":"2022-02-21T11:10:16","modified_gmt":"2022-02-21T05:40:16","slug":"azure-queue","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/azure-queue\/","title":{"rendered":"Azure Queue &#8211; Services Bus and Storage Bus"},"content":{"rendered":"<p>In our previous articles, we have learnt about multiple storage services and compute modules offered by Microsoft Azure. And, now in today\u2019s article, we will learn about one more popular service of Azure which is known as Queue.<\/p>\n<h3>What is Azure Queue?<\/h3>\n<p>In technical words, the queue is a set of entities that are available in computers and data structures. And, this set is arranged and managed in a sequence and the users are authorized to modify these sequences by adding multiple entities at the ends or by removing the entities from the other end.<\/p>\n<p>The sequence where the elements can be added is known as back, trail or rear in the queue. Simultaneously, if head or front in the queue is known as the point from where the users can remove the elements.<\/p>\n<h3>Azure Queue in Simple Words<\/h3>\n<p>For a technical person basically, the queue is a data structure that is used to store data in a sequential manner that follows the FIFO rule which means (First-In-First-Out). Here, the data will be added in the tail and it gets deleted from the front.<\/p>\n<p>Along with that, the data will be added to the tail while it gets deleted from the front. Enqueue is known as adding the data to the rear and deque is known as the process of removing the data from the front.<\/p>\n<h3>Microsoft Azure Queue<\/h3>\n<p>In Microsoft, Azure queues are a similar concept that is used to store messages in the queue. The following process followed inside Microsoft Azure\u2019s messaging queue service. Now let us look at the working mechanism of the Azure queue.<\/p>\n<p><strong>Step 1:<\/strong> In the initial step the sender will send a message which is delivered to the client and then the further process takes place. The message might consist of attributes in it.<\/p>\n<p><strong>Step 2:<\/strong> In the next step the client will process the message and once it is processed the user deletes the message. Azure will store the message for seven days and then will automatically delete it further if it is not done by the user.<br \/>\nIn some situations, there is only a sender and one client or sometimes there might be one sender and multiple clients.<\/p>\n<p>One of the major advantages of the Azure queue service is the decoupling segments. It works in an offbeat climate where the messages can be delivered to various sections of the application. As a result, the queue offers a productive response to the users for an overload work process.<\/p>\n<h3>Architecture of Microsoft Azure Queue Storage<\/h3>\n<p>Microsoft Azure\u2019s Queue Storage service is mainly used by the users to manage asynchronous tasks and for building the workflow process. Below we have mentioned the architectural diagram of the Microsoft Azure Queue Storage.<\/p>\n<h4>1. URL Format<\/h4>\n<p>In Microsoft\u2019s Azure account the user can create the queues by using a unique namespace and addressable with the help of URL format.<\/p>\n<h4>2. Storage Account<\/h4>\n<p>The users mainly use it to offer access and manage all the tasks related to the storage account and it is considered as the building block of Azure services.<\/p>\n<p>For transferring or migrating the incoming messages from one application to another in the storage the users should have a storage account as it provides a unique namespace. It will hold all the data objects that are used in Microsoft Azure such as<\/p>\n<ul>\n<li>Blob Storage<\/li>\n<li>File Storage<\/li>\n<li>Queues Storage<\/li>\n<li>Disks<\/li>\n<\/ul>\n<h4>4. Azure Table Storage<\/h4>\n<p>For accessing the Azure Table Storage service, the users must create a storage account.<\/p>\n<h4>5. Queue<\/h4>\n<p>It is the set of messages in a queue but the queue name should be in lowercase and unique with a valid DNS name having characters ranging from 3 to 63.<\/p>\n<h4>6. Messages<\/h4>\n<p>In Azure, a single message can be up to 64kb in size and it also can be in any format.<\/p>\n<h3>How to Create Azure Storage Account?<\/h3>\n<p>The most convenient method to create Azure File Storage Account is with the help of Azure Portal. The administrators can also make an Azure Storage Account with the help of the following:<\/p>\n<ul>\n<li>Azure PowerShell<\/li>\n<li>Azure CLI<\/li>\n<li>Azure Storage Resource Provider for .NET<\/li>\n<\/ul>\n<p>If the administrators do not want to create a Storage Account then they can also use the Azurite Storage Emulator to deploy and test the code in their local system.<\/p>\n<h3>How to set up the Development Environment<\/h3>\n<p>In Visual Studio the developers can create a new Windows console application. Below, we have mentioned the steps to explain how the developers can create a console application in Visual Studio 2019. The steps are as follows:<\/p>\n<p><strong>1:<\/strong> Firstly, the developer should select the File option<\/p>\n<p><strong>2:<\/strong> In the second step they must click on the New button<\/p>\n<p><strong>3:<\/strong> Click on the project option<\/p>\n<p><strong>4:<\/strong> Select the Platform option<\/p>\n<p><strong>5:<\/strong> Choose the Windows option<\/p>\n<p><strong>6:<\/strong> Select the Console App<\/p>\n<p><strong>7:<\/strong> Next, the Project Name field enter the Application Name<\/p>\n<p><strong>8:<\/strong> Lastly, click on the Create button.<\/p>\n<h3>How to get the Storage Connection String<\/h3>\n<p>Azure Storage Client libraries for .NET supports the storage connection string for configuring the endpoints and credentials for accessing the storage services.<\/p>\n<h3>Peek at the Next Message<\/h3>\n<h4>.NET v12 SDK<\/h4>\n<p>The developers can peek or have a look at the messages in the queue without removing or deleting them from the queue with the help of the PeekMessages method. If the developer doesn\u2019t pass the value for the maxMessages parameter the default is to peek at one message.<\/p>\n<p>Below we have mentioned the sample C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-------------------------------------------------\r\n\/\/ Peek at a message in the queue\r\n\/\/-------------------------------------------------\r\npublic void PeekMessage(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\nif (queueClient.Exists())\r\n{\r\n\/\/ Peek at the next message\r\nPeekedMessage[] peekedMessage = queueClient.PeekMessages();\r\n\/\/ Display the message\r\nConsole.WriteLine($\"Peeked message: '{peekedMessage[0].Body}'\");\r\n}\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<p>The developer can peek at the message in front of the queue without deleting it from the queue with the help of the PeekMessage method.<\/p>\n<p>Below we have mentioned the sample C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\/\/ Create the queue client\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\/\/ Retrieve a reference to a queue\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\n\/\/ Peek at the next message\r\nCloudQueueMessage peekedMessage = queue.PeekMessage();\r\n\/\/ Display message.\r\nConsole.WriteLine(peekedMessage.AsString);<\/pre>\n<h3>Changing the Contents of the Queued Message<\/h3>\n<p>The developers can edit the message contents in the queue. If the message is represented in a work task, then they can use this feature to update the status of the work task.<\/p>\n<p>Below, we have mentioned a code that updates the queue with new contents and will set the visibility timeout for extending another sixty seconds.<\/p>\n<p>This will help the developers and will minimize their state of work connected with the message and will provide the client another minute for continuing working on the message.<\/p>\n<p>The developers can use this technique to track the multistep workflows on the queue messages and this will avoid the task of beginning the task from all over. Basically, it will retry the count as well and if the message is retried more than n times the developers have to delete it.<\/p>\n<p>Thus, it will protect against a message that triggers the application error every time they process.<br \/>\nBelow we have mentioned the C# code<\/p>\n<h4>.NET v12 SDK<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-------------------------------------------------\r\n\/\/ Update an existing message in the queue\r\n\/\/-------------------------------------------------\r\npublic void UpdateMessage(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\nif (queueClient.Exists())\r\n{\r\n\/\/ Get the message from the queue\r\nQueueMessage[] message = queueClient.ReceiveMessages();\r\n\/\/ Update the message contents\r\nqueueClient.UpdateMessage(message[0].MessageId,\r\nmessage[0].PopReceipt,\r\n\"Updated contents\",\r\nTimeSpan.FromSeconds(60.0) \/\/ Make it invisible for another 60 seconds\r\n);\r\n}\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string.\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\/\/ Create the queue client.\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\/\/ Retrieve a reference to a queue.\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\n\/\/ Get the message from the queue and update the message contents.\r\nCloudQueueMessage message = queue.GetMessage();\r\nmessage.SetMessageContent2(\"Updated contents.\", false);\r\nqueue.UpdateMessage(message,\r\nTimeSpan.FromSeconds(60.0), \/\/ Make it invisible for another 60 seconds.\r\nMessageUpdateFields.Content | MessageUpdateFields.Visibility);<\/pre>\n<h3>Dequeue the Next Message in Azure Queue<\/h3>\n<h4>.NET v12 SDK<\/h4>\n<p>Dequeuing the message from the queue can be done in two steps. When the developer calls the ReceiveMessages the developer will get the next message in a queue.<\/p>\n<p>A message will be returned from the ReveiveMessages and will become invisible to any other code for reading the messages from this queue. By default, the following message will be invisible for thirty seconds.<\/p>\n<p>For finishing the remove message from the queue the developers should also call the DeleteMessage.<\/p>\n<p>Thus, these two-step processes for removing the message will assure that if their code fails a message because of hardware or software failure, another instance of the code will also get the same message and retry.<\/p>\n<p>The developer\u2019s code will call DeleteMessage right after the message will be processed.<\/p>\n<h4>C# Code<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-------------------------------------------------\r\n\/\/ Process and remove a message from the queue\r\n\/\/-------------------------------------------------\r\npublic void DequeueMessage(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\nif (queueClient.Exists())\r\n{\r\n\/\/ Get the next message\r\nQueueMessage[] retrievedMessage = queueClient.ReceiveMessages();\r\n\r\n\/\/ Process (i.e. print) the message in less than 30 seconds\r\nConsole.WriteLine($\"Dequeued message: '{retrievedMessage[0].Body}'\");\r\n\/\/ Delete the message\r\nqueueClient.DeleteMessage(retrievedMessage[0].MessageId, retrievedMessage[0].PopReceipt);\r\n}\r\n}<\/pre>\n<h4>NET v11 SDK<\/h4>\n<p>The developer\u2019s code will dequeue the message from a queue in two steps. When the developer calls for GetMessage they will get the next message in a queue.<\/p>\n<p>A message returned from GetMessage becomes invisible to any other code for reading the messages from these queues. By default the following message will be invisible for thirty seconds.<\/p>\n<p>Simultaneously, for removing the message from the queue the developer must also call for the DeleteMessage service.<\/p>\n<p>Thus, these two processes of removing the message will make sure that if their code fails to process a message because of hardware or software failure, then another instance of the code will get the same message and retry it.<\/p>\n<p>The code will call for DeleteMessage right after the processing of the message.<\/p>\n<h4>C# Code<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\r\n\/\/ Create the queue client\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\/\/ Retrieve a reference to a queue\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\n\/\/ Get the next message\r\nCloudQueueMessage retrievedMessage = queue.GetMessage();\r\n\/\/Process the message in less than 30 seconds, and then delete the message\r\nqueue.DeleteMessage(retrievedMessage);<\/pre>\n<h3>Using Async-await Patterns with Common Queue Storage<\/h3>\n<p>In the following sample, it will call the asynchronous version of each of the provided methods as highlighted by the Async suffix of every method.<\/p>\n<p>When an async method is utilized the Async-Await pattern will suspend the local execution until the call is successfully completed.<\/p>\n<p>The behavior will permit the current thread to perform other tasks that will help to lower the performance issues and will improve the overall actions and responsiveness of the application.<\/p>\n<h4>.NET v12 SDK<\/h4>\n<p>Below we have mentioned the C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-------------------------------------------------\r\n\/\/ Perform queue operations asynchronously\r\n\/\/-------------------------------------------------\r\npublic async Task QueueAsync(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\n\r\n\/\/ Create the queue if it doesn't already exist\r\nawait queueClient.CreateIfNotExistsAsync();\r\n\r\nif (await queueClient.ExistsAsync())\r\n{\r\nConsole.WriteLine($\"Queue '{queueClient.Name}' created\");\r\n}\r\nelse\r\n{\r\nConsole.WriteLine($\"Queue '{queueClient.Name}' exists\");\r\n}\r\n\r\n\/\/ Async enqueue the message\r\nawait queueClient.SendMessageAsync(\"Hello, World\");\r\nConsole.WriteLine($\"Message added\");\r\n\r\n\/\/ Async receive the message\r\nQueueMessage[] retrievedMessage = await queueClient.ReceiveMessagesAsync();\r\nConsole.WriteLine($\"Retrieved message with content '{retrievedMessage[0].Body}'\");\r\n\r\n\/\/ Async delete the message\r\nawait queueClient.DeleteMessageAsync(retrievedMessage[0].MessageId, retrievedMessage[0].PopReceipt);\r\nConsole.WriteLine($\"Deleted message: '{retrievedMessage[0].Body}'\");\r\n\r\n\/\/ Async delete the queue\r\nawait queueClient.DeleteAsync();\r\nConsole.WriteLine($\"Deleted queue: '{queueClient.Name}'\");\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<p>Below we have mentioned the C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Create the queue if it doesn't already exist\r\nif(await queue.CreateIfNotExistsAsync())\r\n{\r\nConsole.WriteLine(\"Queue '{0}' Created\", queue.Name);\r\n}\r\nelse\r\n{\r\nConsole.WriteLine(\"Queue '{0}' Exists\", queue.Name);\r\n}\r\n\/\/ Create a message to put in the queue\r\nCloudQueueMessage cloudQueueMessage = new CloudQueueMessage(\"My message\");\r\n\/\/ Async enqueue the message\r\nawait queue.AddMessageAsync(cloudQueueMessage);\r\nConsole.WriteLine(\"Message added\");\r\n\/\/ Async dequeue the message\r\nCloudQueueMessage retrievedMessage = await queue.GetMessageAsync();\r\nConsole.WriteLine(\"Retrieved message with content '{0}'\", retrievedMessage.AsString);\r\n\/\/ Async delete the message\r\nawait queue.DeleteMessageAsync(retrievedMessage);\r\nConsole.WriteLine(\"Deleted message\");<\/pre>\n<h3>Using Additional Options for Dequeuing Messages in Azure Queue<\/h3>\n<p>Here, there are two possible techniques to customize the message retrieval from a queue. Firstly, the developer can get the batch of messages.<\/p>\n<p>Secondly, the developer can set a longer or smaller invisibility timeout which allows their code more or less time to completely process every message.<\/p>\n<h4>.NET v12 SDK<\/h4>\n<p>The following code will use the ReceiveMessages method to get twenty messages in one call. Further, it will process every message with the help of a foreach loop.<\/p>\n<p>It will also set the invisibility timeout rate to five minutes for every message. But note the five minutes starts for all the messages at the same moment so once the five minutes are surpassed as the call to ReceiveMessages any messages that have not been deleted will become visible once again.<\/p>\n<p>Below we have mentioned the C# Code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-----------------------------------------------------\r\n\/\/ Process and remove multiple messages from the queue\r\n\/\/-----------------------------------------------------\r\npublic void DequeueMessages(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\n\r\nif (queueClient.Exists())\r\n{\r\n\/\/ Receive and process 20 messages\r\nQueueMessage[] receivedMessages = queueClient.ReceiveMessages(20, TimeSpan.FromMinutes(5));\r\n\r\nforeach (QueueMessage message in receivedMessages)\r\n{\r\n\/\/ Process (i.e. print) the messages in less than 5 minutes\r\nConsole.WriteLine($\"De-queued message: '{message.Body}'\");\r\n\r\n\/\/ Delete the message\r\nqueueClient.DeleteMessage(message.MessageId, message.PopReceipt);\r\n}\r\n}\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<p>The following code will use the GetMessages method to get twenty messages in one call. Further, it will process every message with the help of a foreach loop.<\/p>\n<p>It will also set the invisibility timeout rate to five minutes for every message.<\/p>\n<p>But note the five minutes starts for all the messages at the same moment so once the five minutes are surpassed as the call to GetMessages any messages that have not been deleted will become visible once again.<\/p>\n<p>Below we have mentioned the C# Code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string.\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\/\/ Create the queue client.\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\/\/ Retrieve a reference to a queue.\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\nforeach (CloudQueueMessage message in queue.GetMessages(20, TimeSpan.FromMinutes(5)))\r\n{\r\n\/\/ Process all messages in less than 5 minutes, deleting each message after processing.\r\nqueue.DeleteMessage(message);\r\n}\r\nGetting the Queue Length<\/pre>\n<h4>.NET v12 SDK<\/h4>\n<p>The developer can get an estimated count of messages in a queue. The GetProperties method will return back the queue properties which includes the message count.<\/p>\n<p>The ApproximateMessageCount property will have all the approximate number of messages in the queue.<\/p>\n<p>The following number will not be lower than the actual number of messages in the queue but it can be more.<\/p>\n<p>Below we have mentioned the C# Code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-----------------------------------------------------\r\n\/\/ Get the approximate number of messages in the queue\r\n\/\/-----------------------------------------------------\r\npublic void GetQueueLength(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\n\r\nif (queueClient.Exists())\r\n{\r\nQueueProperties properties = queueClient.GetProperties();\r\n\r\n\/\/ Retrieve the cached approximate message count.\r\nint cachedMessagesCount = properties.ApproximateMessagesCount;\r\n\r\n\/\/ Display the number of messages.\r\nConsole.WriteLine($\"Number of messages in queue: {cachedMessagesCount}\");\r\n}\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<p>The developer can get an estimated count of messages in a queue. The FetchAttributes method will return back the queue properties which includes the message count.<\/p>\n<p>The ApproximateMessageCount property will have to return back the last value which is retrieved by the FetchAttributes method without calling the Queue Storage.<\/p>\n<p>Below we have mentioned the C# Code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string.\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\/\/ Create the queue client.\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\/\/ Retrieve a reference to a queue.\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\n\/\/ Fetch the queue attributes.\r\nqueue.FetchAttributes();\r\n\/\/ Retrieve the cached approximate message count.\r\nint cachedMessageCount = queue.ApproximateMessageCount;\r\n\/\/ Display the number of messages.\r\nConsole.WriteLine(\"Number of messages in queue: \" + cachedMessageCount);\r\nDeleting the Queue<\/pre>\n<p>&nbsp;<\/p>\n<h4>.NET v12 SDK<\/h4>\n<p>For deleting a queue and all the messages the developers can call the Delete method on the queue object.<br \/>\nBelow we have mentioned the C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/-------------------------------------------------\r\n\/\/ Delete the queue\r\n\/\/-------------------------------------------------\r\npublic void DeleteQueue(string queueName)\r\n{\r\n\/\/ Get the connection string from app settings\r\nstring connectionString = ConfigurationManager.AppSettings[\"StorageConnectionString\"];\r\n\r\n\/\/ Instantiate a QueueClient which will be used to manipulate the queue\r\nQueueClient queueClient = new QueueClient(connectionString, queueName);\r\n\r\nif (queueClient.Exists())\r\n{\r\n\/\/ Delete the queue\r\nqueueClient.Delete();\r\n}\r\n\r\nConsole.WriteLine($\"Queue deleted: '{queueClient.Name}'\");\r\n}<\/pre>\n<h4>.NET v11 SDK<\/h4>\n<p>For deleting a queue and all the messages the developers can call the Delete method on the queue object.<br \/>\nBelow we have mentioned the C# code<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Retrieve storage account from connection string.\r\nCloudStorageAccount storageAccount = CloudStorageAccount.Parse(\r\nCloudConfigurationManager.GetSetting(\"StorageConnectionString\"));\r\n\r\n\/\/ Create the queue client.\r\nCloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();\r\n\r\n\/\/ Retrieve a reference to a queue.\r\nCloudQueue queue = queueClient.GetQueueReference(\"myqueue\");\r\n\r\n\/\/ Delete the queue.\r\nqueue.Delete();<\/pre>\n<h3>Comparison Between Azure Storage Bus vs Service Bus Queues<\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Comparison Criteria<\/b><\/td>\n<td><b>Storage queues<\/b><\/td>\n<td><b>Service Bus queues<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Ordering guarantee<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes &#8211; First-In-First-Out (FIFO)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Delivery guarantee<\/span><\/td>\n<td><span style=\"font-weight: 400;\">At-Least-Once<\/span><\/td>\n<td><span style=\"font-weight: 400;\">At-Least-Once\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Atomic operation support<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Receive behaviour<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Non-blocking<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Blocking with or without a timeout<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Non-blocking<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Push-style API<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/p>\n<p><span style=\"font-weight: 400;\">With the help of\u00a0 .NET, Java, JavaScript, and Go SDKs provide push-style API.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Receive mode<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Peek &amp; Lease<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Peek &amp; Lock<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Receive &amp; Delete<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Exclusive access mode<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Lease-based<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Lock-based<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Lease\/Lock duration<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30 seconds (By-default)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">7 days is the Maximum Value (The administrator can renew or release a message lease with the help of <\/span><span style=\"font-weight: 400;\">UpdateMessage<\/span><span style=\"font-weight: 400;\"> API.)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">30 seconds (default)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">The developer can renew the message lock for the same lock duration at every time manually. Otherwise, they can make use of the automatic lock for renewing the feature where the client will manage the lock renewal.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Lease\/Lock precision<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Message level<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Every message will have an individual timeout value which can be further updated as per the requirement while processing the message with the help of UpdateMessage API.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Queue level<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">Every Queue will be applied with a lock precision, but the lock can be renewed.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Batched receive<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Batched send<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Steps to Create Queue in Microsoft Azure Portal<\/h3>\n<p>Before making a queue, the user should already have a resource group and a storage account. Below are the steps to create Queue in Azure portal:<\/p>\n<p><strong>1:<\/strong> The user should firstly log in to their Azure Portal<\/p>\n<p><strong>2:<\/strong> In the second step, the user should click on the storage account and open it.<\/p>\n<p><strong>3:<\/strong> Slowly the user should scroll down and then go to the Queue services<\/p>\n<p><strong>4:<\/strong> Now, click on the \u201c+Queue\u201d option to make a new queue<\/p>\n<p><strong>5:<\/strong> Once you click on the \u201c+Queue\u201d button, a new window comes on the screen for \u201cAdd Queue\u201d. Here the user must insert the queue name in the box and then click on the Ok button.<\/p>\n<p>Finally, the queue is ready and the user can see their queue in the Microsoft Azure Storage Explorer.<\/p>\n<h3>Steps to Add Message in Azure Queue<\/h3>\n<p>Follow the below steps to add message in Azure Queues:<\/p>\n<p><strong>1:<\/strong> After creating a queue the user should select it located in the Queue Page.<\/p>\n<p><strong>2:<\/strong> Secondly, click on the Add Message From option<\/p>\n<p><strong>3:<\/strong> Now, the user should type a message in the text field along with that they can set the time limitation in the expire section.<\/p>\n<p><strong>4:<\/strong> Finally, the user must click on the OK button for adding a new message in the queue.<\/p>\n<h3>How to manage the Queue using PowerShell<\/h3>\n<p>Follow the below steps to manage Azure queue using PowerShell:<\/p>\n<p><strong>1:<\/strong> Firstly, the developer should Right-Click on the PowerShell option available in the taskbar and then select the Run ISE as Administrator option.<\/p>\n<p><strong>2:<\/strong> Now the developer should run the following command for accessing the account.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$context = New-AzureStorageContext -StorageAccountName AccountName StorageAccountKey\r\niUZNeeJD+ChFHt9XHL6D5rkKFWjzyW4FhV0iLyvweDi+Xtzfy76juPzJ+mWtDmbqCWjsu\/nr+1pqBJj rdOO2+A==<\/pre>\n<p><strong>Note:<\/strong> Remember to replace the \u201cAccountName\u201d with your Account Name.<\/p>\n<p><strong>3:<\/strong> Now the developer should mention the storage account in which they want to create a queue<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Set-AzureSubscription \u2013SubscriptionName \"BizSpark\" -CurrentStorageAccount AccountName<\/pre>\n<p><strong>4:<\/strong> Lastly, create a queue<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$QueueName = \"thisisaqueue\"\r\n$Queue = New-AzureStorageQueue \u2013Name $QueueName -Context $Ctx<\/pre>\n<h3>Dequeue Next Message from Queue<\/h3>\n<p>Follow the below steps to deque message from queue:<\/p>\n<p><strong>1:<\/strong> In the first step the developer should connect their account and specify the storage account by running the following commands<\/p>\n<p><strong>2:<\/strong> In the second step the developer should retrieve the queue by running the following command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$QueueName = \"myqueue\"\r\n$Queue = Get-AzureStorageQueue -Name $QueueName -Context $ctx\r\n$InvisibleTimeout = [System.TimeSpan]::FromSeconds(10)<\/pre>\n<p><strong>3:<\/strong> In the next step the developer should deque the next message by running the following command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$QueueMessage = $Queue.CloudQueue.GetMessage($InvisibleTimeout)<\/pre>\n<p><strong>4:<\/strong> In the last step the developer should run the following code to delete the dequeued message, by running the following command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$Queue.CloudQueue.DeleteMessage($QueueMessage)<\/pre>\n<h3>Uses of Microsoft Azure Queues<\/h3>\n<ul>\n<li>Users primarily use Microsoft Azure\u2019s Queue service for the assured delivery system messages that take place between the applications.<\/li>\n<li>Secondly, Azure\u2019s Storage Queue allows storing the users to store the messages until the system is available to process further queues.<\/li>\n<li>Microsoft Azure Storage will also permit the user\u2019s application components to communicate with each other in the cloud premises, in the desktops, on-premises, or the mobile devices with the help of decoupling system segments.<\/li>\n<li>Microsoft\u2019s Azure Storage offers a wide range of client libraries to the users which helps them to interact with the Azure Storage Queues which offers support when there is a failure in the application component.<\/li>\n<\/ul>\n<h3>Features of Microsoft Azure Queues<\/h3>\n<h4>1. Decoupling the Components<\/h4>\n<p>The developers can make use of the Azure Queue Storage service to develop flexible applications and individual functions for better durability across massive workloads.<\/p>\n<p>When the developers design the application for scale then the application\u2019s components can be decoupled and they can scale up individually.<\/p>\n<p>Queue storage offers asynchronous message queueing for better communication between the application components.<\/p>\n<h4>2. Build-in Resilience<\/h4>\n<p>Azure Queue Storage helps the developers to make their applications scalable and less sensitive towards every component failure.<\/p>\n<p>If any component of the architecture fails, the messages will be buffered and further, they will be naturally raised by other message processing nodes which will take the responsibility to maintain the integrity of the workload.<\/p>\n<h4>3. Scale for Bursts<\/h4>\n<p>Developers can utilize Azure Queue Storage for right-sizing their service deployment. Applications will take unexpected traffic bursts which will prevent the servers from being overwhelmed with the sudden rise of requests.<\/p>\n<p>The developers can monitor the length of the queue for adding the elasticity of the application and then hibernate or deploy the additional worker nodes depending upon the requirement.<\/p>\n<h3>Limitations of Microsoft Azure Queue<\/h3>\n<p>Microsoft\u2019s Azure Queue storage service is useful to store a massive number of messages. It permits the users to access the messages globally with the help of authenticated calls by using HTTP and HTTPS.<\/p>\n<p>Also, the maximum size of a single message can be only 64kb. But a queue can have millions of messages and the maximum capacity of it is dependent upon the storage account.<\/p>\n<h3>Conclusion<\/h3>\n<p>Now, we are into the last section of our article and today we learnt about Microsoft\u2019s Azure Queue Storage which is popular among users to store a wide range of messages. It also helps them to easily transfer the messages between multiple applications.<\/p>\n<p>Along with that Microsoft takes the responsibility to manage the data in the queue and the users only have to pay for the resources they use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous articles, we have learnt about multiple storage services and compute modules offered by Microsoft Azure. And, now in today\u2019s article, we will learn about one more popular service of Azure which&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":107972,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26500],"tags":[26602,26600,26597,26598,26599,26601,26603],"class_list":["post-107925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-azure-tutorials","tag-add-message-in-azure-queue","tag-architecture-of-azure-queue-storage","tag-azure-queues","tag-azure-service-bus","tag-azure-storage-bus","tag-create-queue-in-azure-portal","tag-features-of-azure-queues"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Azure Queue - Services Bus and Storage Bus - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Azure Queue, its features and uses. See how to create queue in azure portal, add message in it, queue and dequeue message etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/azure-queue\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure Queue - Services Bus and Storage Bus - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Azure Queue, its features and uses. See how to create queue in azure portal, add message in it, queue and dequeue message etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/azure-queue\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-21T03:30:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-21T05:40:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure Queue - Services Bus and Storage Bus - DataFlair","description":"Learn about Azure Queue, its features and uses. See how to create queue in azure portal, add message in it, queue and dequeue message etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/azure-queue\/","og_locale":"en_US","og_type":"article","og_title":"Azure Queue - Services Bus and Storage Bus - DataFlair","og_description":"Learn about Azure Queue, its features and uses. See how to create queue in azure portal, add message in it, queue and dequeue message etc.","og_url":"https:\/\/data-flair.training\/blogs\/azure-queue\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-02-21T03:30:30+00:00","article_modified_time":"2022-02-21T05:40:16+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Azure Queue &#8211; Services Bus and Storage Bus","datePublished":"2022-02-21T03:30:30+00:00","dateModified":"2022-02-21T05:40:16+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/"},"wordCount":2941,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp","keywords":["Add Message in Azure Queue","architecture of Azure queue storage","Azure Queues","Azure service bus","Azure storage bus","create queue in Azure Portal","Features of Azure Queues"],"articleSection":["Microsoft Azure Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/azure-queue\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/","url":"https:\/\/data-flair.training\/blogs\/azure-queue\/","name":"Azure Queue - Services Bus and Storage Bus - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp","datePublished":"2022-02-21T03:30:30+00:00","dateModified":"2022-02-21T05:40:16+00:00","description":"Learn about Azure Queue, its features and uses. See how to create queue in azure portal, add message in it, queue and dequeue message etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/azure-queue\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/02\/azure-queue.webp","width":1200,"height":628,"caption":"azure queue"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/azure-queue\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Microsoft Azure Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/microsoft-azure-tutorials\/"},{"@type":"ListItem","position":3,"name":"Azure Queue &#8211; Services Bus and Storage Bus"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=107925"}],"version-history":[{"count":2,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107925\/revisions"}],"predecessor-version":[{"id":107938,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107925\/revisions\/107938"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/107972"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=107925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=107925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=107925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}