{"id":6753,"date":"2011-05-18T00:00:00","date_gmt":"2011-05-18T00:00:00","guid":{"rendered":""},"modified":"2025-09-10T11:45:32","modified_gmt":"2025-09-10T18:45:32","slug":"using-the-service-bus-via-rest-http","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/","title":{"rendered":"Using the Service Bus via REST \/ HTTP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">[This article was contributed by the AppFabric team.]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/blogs.msdn.com\/b\/appfabric\/archive\/2011\/05\/14\/announcing-the-windows-azure-appfabric-ctp-may-and-june-releases.aspx\">new Service Bus Durable Messaging features<\/a> introduced with the May 2011 CTP are really cool, and what&#8217;s even better than a slew of new messaging features added to the AppFabric is the fact that many of them are accessible from clients on any platform using HTTP. In this post, I&#8217;m going to introduce you to using the Service Bus REST endpoint for Messaging; some of it might remind you of the <a href=\"https:\/\/blogs.msdn.com\/b\/willpe\/archive\/2010\/11\/01\/getting-started-with-service-bus-v2-october-ctp-connection-points.aspx\">October CTP<\/a>, we&#8217;ll be using Queues (so taking a look at <a href=\"https:\/\/blogs.msdn.com\/b\/appfabric\/archive\/2011\/05\/17\/an-introduction-to-service-bus-queues.aspx\">David&#8217;s post<\/a> from Tuesday could be a good idea), and getting to grips with <a href=\"https:\/\/blogs.msdn.com\/b\/willpe\/archive\/2011\/05\/12\/getting-access-control-service-tokens-via-http.aspx\">How Access Control Tokens work over HTTP<\/a> would be a great primer, too.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a-preface-to-the-restful-service-bus\">A Preface to the RESTful Service Bus<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Typically, users of the Service Bus download and install the AppFabric SDK, add a reference to <em>Microsoft.ServiceBus<\/em> and\/or <em>Microsoft.ServiceBus.Messaging<\/em> and use the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.servicebus.servicebusnamespaceclient.aspx\">ServiceBusNamespaceClient<\/a> to perform management operations (creating, enumerating and deleting any queues, topics or subscriptions) or the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.servicebus.messaging.messagingfactory.aspx\">MessagingFactory<\/a> to Send and Receive messages. Details like addressing and security are taken care of by the SDK: there&#8217;s no need to get or renew Access Control Service tokens and no need to interact directly with the service &#8211; you just use the SDK. With the REST endpoint, you get a little closer to the metal which &#8211; in this geek&#8217;s humble opinion &#8211; can be at least a little bit more fun!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wherever possible, you&#8217;ll want to use our SDK. It sheilds you from some of the underlying complexity of the service, may help to protect you as features change in future and &#8211; frankly &#8211; it&#8217;s just a lot easier. That said, there are plenty of times when you won&#8217;t be able to use the SDK, for example: when working on a non desktop .Net Framework version (like Windows Phone 7 or Silverlight); when working on non-microsoft platforms (like iOS, Android, Java, PHP or Ruby); and when working with older versions of the .Net Framework.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For convenience and consistency, the code samples in this post are shown in C# &#8211; that&#8217;s not because you&#8217;d be writing in C# when using the Service Bus from iOS, PHP or Ruby, of course! I want to focus today on showing some of the basics of using our REST API from a language that many of you will be familiar with. That said, you can look forward to future posts in a wider variety of languages showing the awesome things you can do with Service Bus across platforms and devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are 5 things I&#8217;ll be covering in this post to get you started &#8211; please leave your feedback on areas you&#8217;d like have more detail, examples and guidance either in the comments (below) or the <a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/en-US\/appfabricctp\/\">AppFabric CTP Forums<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Get a security token from the Access Control Service<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Create a Queue in your service namespace<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Send a Message to the Queue<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Receive the Message from the Queue<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Delete the Queue<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;re going to be busy &#8211; so make sure you have an account set up at the <a href=\"https:\/\/portal.appfabriclabs.com\/\">AppFabric Labs Portal<\/a> and Lets Get Started!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-and-using-a-security-token\">Getting and Using a Security Token<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Last Week, I provided some guidance on <a href=\"https:\/\/blogs.msdn.com\/b\/willpe\/archive\/2011\/05\/12\/getting-access-control-service-tokens-via-http.aspx\">Getting and Understanding an Access Control Service Token via HTTP<\/a>, so I won&#8217;t provide a huge level of detail today on the topic. Suffice to say, the service bus requires that you present a WRAP access token in the HTTP Authorization Header, like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nAuthorization: WRAP access_token=\"<Your Token Here>\"\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Firstly, we&#8217;ll get a token from ACS using the Issuer Name and Key which you can look up in the <a href=\"https:\/\/portal.appfabriclabs.com\/\">AppFabric Portal<\/a>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nstring serviceNamespace = \"contoso\";  string issuerName  = \"owner\";  string issuerPassword = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=\";    string acsBaseAddress = \"https:\/\/\" + serviceNamespace + \"-sb.accesscontrol.appfabriclabs.com\/\";    \/\/ Note that the scheme is Http  string relyingPartyAddress = \"https:\/\/\" + serviceNamespace + \".servicebus.appfabriclabs.com\/\";    \/\/ Create the body of the Post Request, formatted as a HTTP Form  string postData = \"wrap_scope=\" + Uri.EscapeDataString(relyingPartyAddress) +                    \"&wrap_name=\" + Uri.EscapeDataString(issuerName) +                    \"&wrap_password=\" + Uri.EscapeDataString(issuerPassword);    string authorizationToken;  using (WebClient acsWebClient = new WebClient())  {      \/\/ The response contains the access token and its expiry time formatted as an HTTP       \/\/ Form like: wrap_access_token=<token>&wrap_expiry_time=2000      string response = acsWebClient.UploadString(acsAddress, \"POST\", postData);        string[] tokenVariables = response.Split('&');      string[] tokenVariable = tokenVariables[0].Split('=');      authorizationToken = Uri.UnescapeDataString(tokenVariable[1]);  }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The access token contains its expiry time (currently defaulting to 20 minutes), and you can keep using the same token over-and-over again until it expires. However, once the expiry time elapses you&#8217;ll need to request a fresh token from the Access Control Service. Now we&#8217;ll go ahead and create a WebClient to use for our calls to the service bus; we initialize it by correctly setting the Authorization header &#8211; you need this header to be present in any call you make to the service bus.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nWebClient webClient = new WebClient();  webClient.Headers[\"Authorization\"] = \"WRAP access_token=\"\" + authorizationToken + \"\"\";\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"creating-a-new-queue\">Creating a new Queue<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the October CTP, we introduced the idea of Namespace Management: an explicit, RESTful interface to Create, Enumerate and Delete durable Service Bus entities (in the May CTP these are: Queues, Topics and Subscriptions). That concept carries through to the May CTP with just a couple of changes. You still use the established RESTful pattern (HTTP GET to retrieve\/enumerate; HTTP PUT to create; HTTP DELETE to remove) to interact with Atom Feeds and Entries; we&#8217;ve simplified things by combining the Management Namespace (formerly https:\/\/&lt;your-namespace&gt;-mgmt.servicebus.appfabriclabs.com\/) with the Service Namespace (still https:\/\/&lt;your-namespace&gt;.servicebus.appfabriclabs.com) though.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A queue can exist anywhere in your service namespace &#8211; you create it by putting the description of the queue to a &#8216;vacant&#8217; uri in your namespace. We&#8217;ll need to specify the correct content type for the request (<strong>Content-Type: application\/atom+xml<\/strong>) then issue an <strong>HTTP PUT<\/strong> to the Uri of the new queue (using the secure, https scheme) containing the Atom Entry which defines it:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/ Note that the scheme is Https  string serviceAddress = \"https:\/\/\" + serviceNamespace + \".servicebus.appfabriclabs.com\/\";    string queueName = \"MyFirstQueue\";  string putData = @\"<entry xmlns=\"\"https:\/\/www.w3.org\/2005\/Atom\"\">                       <title type=\"\"text\"\">\" + queueName + @\"<\/title>                       <content type=\"\"application\/xml\"\">                         <QueueDescription xmlns:i=\"\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\" xmlns=\"\"\"\" \/>                       <\/content>                     <\/entry>\";    string queueAddress = serviceAddress + queueName;    webClient.Headers[\"Content-Type\"] = \"application\/atom+xml\";  string response = webClient.UploadString(queueAddress, \"PUT\", putData);\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The response to the request contains the Atom Entry for your newly created Queue (below) including all of the settable properties of the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.servicebus.messaging.queuedescription.aspx\">Queue Description<\/a>. Updates to existing queues are not allowed, but you can include any of these properties in the Queue Description when you are creating a new queue.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n<entry xmlns=\"https:\/\/www.w3.org\/2005\/Atom\">    <id>https:\/\/willpe.servicebus.appfabriclabs.com\/MyFirstQueue<\/id>    <title type=\"text\">MyFirstQueue<\/title>    <published>2011-05-17T20:26:00Z<\/published>    <updated>2011-05-17T20:26:00Z<\/updated>    <author>      <name>willpe<\/name>    <\/author>    <link rel=\"self\" href=\"https:\/\/willpe.servicebus.appfabriclabs.com\/MyFirstQueue\"\/>    <content type=\"application\/xml\">      <QueueDescription xmlns=\"\" xmlns:i=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\">        <LockDuration>PT30S<\/LockDuration>        <MaxQueueSizeInBytes>104857600<\/MaxQueueSizeInBytes>        <RequiresDuplicateDetection>false<\/RequiresDuplicateDetection>        <RequiresSession>false<\/RequiresSession>        <DefaultMessageTimeToLive>P10675199DT2H48M5.4775807S<\/DefaultMessageTimeToLive>        <DeadLetteringOnMessageExpiration>false<\/DeadLetteringOnMessageExpiration>        <DuplicateDetectionHistoryTimeWindow>PT10M<\/DuplicateDetectionHistoryTimeWindow>      <\/QueueDescription>    <\/content>  <\/entry>\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"sending-a-message-to-the-queue\">Sending a Message to the Queue<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sending a message using the REST endpoint is really simple: just HTTP Post the body of the message to the Queue&#8217;s incoming messages uri with the Authorization header in place (specifying the correct content type for the message&#8217;s body):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nstring messageBody = \"Hello World!\";  string sendAddress = serviceAddress + queueName + \"\/Messages\";    webClient.Headers[\"Content-Type\"] = \"text\/plain\";  webClient.UploadString(sendAddress, \"POST\", messageBody);\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"receiving-a-message-from-the-queue\">Receiving a Message from the Queue<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Messages can be received with either <strong>Peek Lock<\/strong> or <strong>Receive And Delete<\/strong> semantics; both are supported via REST, but for now we&#8217;ll use Receive and Delete. Receiving in this mode is as simple as issuing a HTTP Delete request to the Head of the Message Queue with a receive timeout:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nstring receiveAddress = serviceAddress + queueName + \"\/Messages\/Head?timeout=30\";  string receivedMessageBody = webClient.UploadString(receiveAddress, \"DELETE\", string.Empty);\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The receivedMessageBody contains the plain text sent earlier (neat!) &#8211; you can also take a look at the Response Headers to find more properties of the message:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nX-MS-MESSAGE-ID: d78afc3299b54ab2bd0e97b183ab1f77  X-MS-DELIVERY-COUNT: 0  X-MS-SEQUENCE-NUMBER: 2  X-MS-SIZE: 12  Content-Type: text\/plain\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"deleting-the-queue\">Deleting the Queue<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, it&#8217;s time to delete the queue; this is acheived by a simple HTTP Delete to the Queue&#8217;s Address:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nwebClient.UploadString(queueAddress, \"DELETE\", string.Empty);\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">So, there we have it &#8211; a quick introduction to using the new REST features of AppFabric Service Bus Messaging. There&#8217;s lots more you can do, and I&#8217;ll be covering more of the features next week but it&#8217;s never too early to send the team your feedback &#8211; visit the <a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/en-US\/appfabricctp\/\">AppFabric CTP Forum<\/a> and tell us what you think!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In particular, we&#8217;d love to hear from you around how you&#8217;ll be using HTTP in Applications you build:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Which platforms and devices are you considering using Service Bus from?<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Which feature(s) of the Service Bus are most important for us to support over HTTP to make your applications successful?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Take the HTTP Feature Survey to help shape the future of Service Bus!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[This article was contributed by the AppFabric team.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1498],"tags":[],"audience":[],"content-type":[1511],"product":[1586],"tech-community":[],"topic":[],"coauthors":[97],"class_list":["post-6753","post","type-post","status-publish","format-standard","hentry","category-integration","content-type-best-practices","product-service-bus","review-flag-1680286580-543","review-flag-1680286581-295","review-flag-1680286581-364","review-flag-1-1680286581-825","review-flag-2-1680286581-601","review-flag-5-1680286581-950","review-flag-7-1680286581-146","review-flag-and-o-1680286581-349","review-flag-anywh-1680286580-635","review-flag-never-1680286580-606","review-flag-new-1680286579-546"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what&#039;s even better than a slew of new\u2026\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what&#039;s even better than a slew of new\u2026\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-18T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-10T18:45:32+00:00\" \/>\n<meta name=\"author\" content=\"Microsoft Azure\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Azure\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/\",\"@type\":\"Person\",\"@name\":\"Microsoft Azure\"}],\"headline\":\"Using the Service Bus via REST \/ HTTP\",\"datePublished\":\"2011-05-18T00:00:00+00:00\",\"dateModified\":\"2025-09-10T18:45:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\"},\"wordCount\":1215,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"articleSection\":[\"Integration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\",\"name\":\"Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"datePublished\":\"2011-05-18T00:00:00+00:00\",\"dateModified\":\"2025-09-10T18:45:32+00:00\",\"description\":\"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what's even better than a slew of new\u2026\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integration\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/integration\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using the Service Bus via REST \/ HTTP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog","description":"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what's even better than a slew of new\u2026","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:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/","og_locale":"en_US","og_type":"article","og_title":"Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog","og_description":"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what's even better than a slew of new\u2026","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2011-05-18T00:00:00+00:00","article_modified_time":"2025-09-10T18:45:32+00:00","author":"Microsoft Azure","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Microsoft Azure","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/","@type":"Person","@name":"Microsoft Azure"}],"headline":"Using the Service Bus via REST \/ HTTP","datePublished":"2011-05-18T00:00:00+00:00","dateModified":"2025-09-10T18:45:32+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/"},"wordCount":1215,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"articleSection":["Integration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/","name":"Using the Service Bus via REST \/ HTTP | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"datePublished":"2011-05-18T00:00:00+00:00","dateModified":"2025-09-10T18:45:32+00:00","description":"The new Service Bus Durable Messaging features introduced with the May 2011 CTP are really cool, and what's even better than a slew of new\u2026","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-the-service-bus-via-rest-http\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Integration","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/integration\/"},{"@type":"ListItem","position":3,"name":"Using the Service Bus via REST \/ HTTP"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=6753"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6753\/revisions"}],"predecessor-version":[{"id":46058,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6753\/revisions\/46058"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=6753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=6753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=6753"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=6753"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=6753"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=6753"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=6753"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=6753"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=6753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}