<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Windows Azure AppFabric</title>
        <link>http://www.rickgaribay.net/category/34.aspx</link>
        <description>Windows Azure AppFabric</description>
        <language>en-US</language>
        <copyright>Rick G. Garibay</copyright>
        <managingEditor>rick@rickgaribay.net</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Azure AppFabric Service Bus Brokered Messaging GA &amp;amp; Rude CTP Diffs</title>
            <link>http://rickgaribay.net/archive/2011/09/14/azure-appfabric-service-bus-brokered-messaging-ga-amp-rude-ctp.aspx</link>
            <description>&lt;p&gt;Today at the Build conference in Anaheim California, Satya Nadella, President Server and Tools business announced general availability of the production release of AppFabric Queues and Topics, otherwise known as Brokered Messaging.&lt;/p&gt;  &lt;p&gt;Brokered Messaging introduces durable queue capabilities and rich, durable pub-sub with topics and subscriptions that compliment the existing Relayed Messaging capabilities.  &lt;/p&gt;  &lt;p&gt;I covered Brokered Messaging following the &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx" target="_blank"&gt;May CTP release&lt;/a&gt; of &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx" target="_blank"&gt;Queues&lt;/a&gt; and followed up shortly with an overview and exploration of &lt;a href="http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx" target="_blank"&gt;Topics&lt;/a&gt; (please see some other great resources at the end of this post).&lt;/p&gt;  &lt;p&gt;Since then, there was a June CTP release which included the new AppFabric Application and no visible changes to Brokered Messaging, however since its release, the AppFabric Messaging team has been hard at work refining the API and behaviors based on feedback from Advisors, MVPs and the community at large. &lt;/p&gt;  &lt;p&gt;Since I’ve already covered Queues and Topics in the aforementioned posts, I’ll dive right in to some terse examples which demonstrate the API changes. Though not an exhaustive review of all of the changes, I’ve covered the types that your most likely to come across and will cover Queues, Topics and Subscriptions extensively in my upcoming article in &lt;a href="http://www.code-magazine.com/SearchResults.aspx?search=garibay" target="_blank"&gt;CODE Magazine&lt;/a&gt; which will also include more in-depth walk-throughs of the .NET Client API, REST API and WCF scenarios.&lt;/p&gt;  &lt;p&gt;Those of you who have worked with the CTPs will find some subtle and not so subtle changes, but all in all I think all of the refinements are for the best and I think you’ll appreciate them as I have. For those new to Azure AppFabric Service Bus Brokered Messaging, you’ll benefit most from reading my first two posts based on the May CTP (or any of the resources at the end of this post) to get an idea of the why behind queues and topics and then come back here to explore the what and how.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;A Quick Note on Versioning&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In the CTPs that preceded the release of the new Azure AppFabric Service Bus features, a temporary assembly called “Microsoft.ServiceBus.Messaging.dll” was added to serve a container for new features and deltas that were introduced during the development cycle. The final release includes a single assembly called “Microsoft.ServiceBus.dll” which contains all of the existing relay capabilities that you’re already familiar with as well as the addition of support for queues and topics. If you are upgrading from the CTPs, you’ll want to get ahold of the new Microsoft.ServiceBus.dll version 1.5 which includes everything plus the new queue and topic features.&lt;/p&gt;  &lt;p&gt;The new 1.5 version of the Microsoft.ServiceBus.dll assembly targets the .NET 4.0 framework. Customers using .NET 3.5 can continue using the existing Microsoft.ServiceBus.dll  assembly (version 1.0.1123.2) for leveraging the relay capabilities, but must upgrade to .NET 4.0 to take advantage of the latest features presented here.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;.NET Client API&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Queues&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="1072"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="251"&gt;&lt;strong&gt;May/June CTP&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="251"&gt;&lt;strong&gt;General Availability&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="568"&gt;&lt;strong&gt;Comments&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;ServiceBusNamespaceClientSettings&lt;/td&gt;        &lt;td valign="top" width="251"&gt;NamespaceManagerSettings&lt;/td&gt;        &lt;td valign="top" width="568"&gt;New class for encapsulating endpoint and security settings.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;N/A&lt;/td&gt;        &lt;td valign="top" width="251"&gt;TokenProvider&lt;/td&gt;        &lt;td valign="top" width="568"&gt;New class for acquiring a WRAP token from ACS.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;ServiceBusNamespaceClient&lt;/td&gt;        &lt;td valign="top" width="251"&gt;NamespaceManager&lt;/td&gt;        &lt;td valign="top" width="568"&gt;Root management object for creating Queues, Topics, Subscriptions.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;Queue&lt;/td&gt;        &lt;td valign="top" width="251"&gt;QueueDescription&lt;/td&gt;        &lt;td valign="top" width="568"&gt;In May/June CTP, Topic / Queue / Subscription were management objects. All create/delete operations were moved to NamespaceManager and the state operations are now on TopicDescription/QueueDescription etc.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;MessagingFactorySettings&lt;/td&gt;        &lt;td valign="top" width="251"&gt;MessagingFactorySettings&lt;/td&gt;        &lt;td valign="top" width="568"&gt;New class for encapsulating security settings.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;MessagingFactory&lt;/td&gt;        &lt;td valign="top" width="251"&gt;MessagingFactory&lt;/td&gt;        &lt;td valign="top" width="568"&gt; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;BrokeredMessage&lt;/td&gt;        &lt;td valign="top" width="251"&gt;BrokeredMessage&lt;/td&gt;        &lt;td valign="top" width="568"&gt;No longer a factory. Simply instantiate a BrokeredMessage.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;MessageSender&lt;/td&gt;        &lt;td valign="top" width="251"&gt;MessageSender&lt;/td&gt;        &lt;td valign="top" width="568"&gt;Optional, for use when you want to abstract away queue or topic.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="251"&gt;MessageReceiver&lt;/td&gt;        &lt;td valign="top" width="251"&gt;MessageReceiver&lt;/td&gt;        &lt;td valign="top" width="568"&gt;Optional, for use when you want to abstract away queue or topic.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Below is a representative sample for creating, configuring, sending and receiving a message on a queue:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Administrative Operations&lt;/strong&gt;&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 817px; padding-right: 5px; height: 397px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:             &lt;span style="color: #008000"&gt;// Configure and create NamespaceManager for performing administrative operations&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:             NamespaceManagerSettings settings = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NamespaceManagerSettings();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:             TokenProvider tokenProvider = settings.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuer,key);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:             NamespaceManager manager = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NamespaceManager(ServiceBusEnvironment.CreateServiceUri("&lt;span style="color: #8b0000"&gt;sb&lt;/span&gt;", serviceNamespace, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty), settings);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8:             &lt;span style="color: #008000"&gt;// Check for existence of queues on the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:             var qs = manager.GetQueues();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:             var result = from q &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; qs
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12:                          where q.Path.Equals(queueName, StringComparison.OrdinalIgnoreCase)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13:                          select q;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15:             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (result.Count() == 0)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Queue does not exist&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19:                 &lt;span style="color: #008000"&gt;// Create Queue&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Creating Queue...&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 22:                 manager.CreateQueue(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; QueueDescription(queueName) { LockDuration = TimeSpan.FromSeconds(5.0d) });
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 23:                 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 24:             }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Runtime Operations&lt;/strong&gt;&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 815px; padding-right: 5px; height: 716px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1:             &lt;span style="color: #008000"&gt;// Create and Configure Messaging Factory to provision QueueClient&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:             MessagingFactorySettings messagingFactorySettings = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MessagingFactorySettings();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:             messagingFactorySettings.TokenProvider = settings.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuer, key);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:             MessagingFactory messagingFactory = MessagingFactory.Create(ServiceBusEnvironment.CreateServiceUri("&lt;span style="color: #8b0000"&gt;sb&lt;/span&gt;", serviceNamespace, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty), messagingFactorySettings);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:             QueueClient queueClient = messagingFactory.CreateQueueClient(queueName, ReceiveMode.PeekLock);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8:             Order order = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Order();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:             order.OrderId = 42;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:             order.Products.Add("&lt;span style="color: #8b0000"&gt;Kinect&lt;/span&gt;", 70.50M);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:             order.Products.Add("&lt;span style="color: #8b0000"&gt;XBOX 360&lt;/span&gt;", 199.99M);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12:             order.Total = order.Products["&lt;span style="color: #8b0000"&gt;Kinect&lt;/span&gt;"] + order.Products["&lt;span style="color: #8b0000"&gt;XBOX 360&lt;/span&gt;"];
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14:             &lt;span style="color: #008000"&gt;// Create a Brokered Message from the Order object&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15:             BrokeredMessage msg = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BrokeredMessage(order);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17:             &lt;span style="color: #008000"&gt;/***********************
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18:             *** Send Operations  ***
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19:             ************************/
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21:             queueClient.Send(msg);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 22: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 23:             &lt;span style="color: #008000"&gt;/**************************
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 24:              *** Receive Operations ***
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 25:             ***************************/
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 26:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 27:             BrokeredMessage recdMsg;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 28:             Order recdOrder;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 29: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 30:             &lt;span style="color: #008000"&gt;// Receive and lock message&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 31:             recdMsg = queueClient.Receive();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 32: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 33:             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(recdMsg != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 34:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 35:                 &lt;span style="color: #008000"&gt;// Convert from BrokeredMessage to native Order&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 36:                 recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 37: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 38:                 Console.ForegroundColor = ConsoleColor.Green;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 39:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Received Order {0} \n\t with Message Id {1} \n\t and Lock Token:{2} \n\t from {3} \n\t with total of ${4}&lt;/span&gt;", recdOrder.OrderId, recdMsg.MessageId, recdMsg.LockToken, "&lt;span style="color: #8b0000"&gt;Receiver 1&lt;/span&gt;", recdOrder.Total);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 40:                 recdMsg.Complete();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 41:             }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 42:             queueClient.Close();&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Note that MessageSender and MessageReceiver are now optional. Here’s an example that shows PeekLocking a message, simulating an exception and trying again:&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 828px; padding-right: 5px; height: 533px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:             &lt;span style="color: #008000"&gt;// Alternate receive approach using agnostic MessageReceiver&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:             MessageReceiver receiver = messagingFactory.CreateMessageReceiver(queueName);            &lt;span style="color: #008000"&gt;// Recieve, complete, and delete message from the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5:             &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7:                 &lt;span style="color: #008000"&gt;// Receive and lock message&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8:                 recdMsg = receiver.Receive();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:                 &lt;span style="color: #008000"&gt;// Convert from BrokeredMessage to native Order&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:                 recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13:                 &lt;span style="color: #008000"&gt;// Complete read, release and delete message from the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14:                 receiver.Complete(recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16:                 Console.ForegroundColor = ConsoleColor.Green;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Received Order {0} \n\t with Message Id {1} \n\t and Lock Token:{2} \n\t from {3} \n\t with total of ${4} \n\t at {5}&lt;/span&gt;", recdOrder.OrderId, recdMsg.MessageId, recdMsg.LockToken, "&lt;span style="color: #8b0000"&gt;Receiver 2&lt;/span&gt;", recdOrder.Total, DateTime.Now.Hour + "&lt;span style="color: #8b0000"&gt;:&lt;/span&gt;" + DateTime.Now.Minute + "&lt;span style="color: #8b0000"&gt;:&lt;/span&gt;" + DateTime.Now.Second);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18:             }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19:             &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21:                 &lt;span style="color: #008000"&gt;// Should processing fail, release the lock from the fabric and make message available for later processing.&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 22:                 &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (recdMsg != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 23:                 {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 24:                     receiver.Abandon(recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 25:                     
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 26:                     Console.ForegroundColor = ConsoleColor.Red;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 27:                     Console.WriteLine("&lt;span style="color: #8b0000"&gt;Message could not be processed.&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 28: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 29:                 }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 30:             }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 31:             &lt;span style="color: #0000ff"&gt;finally&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 32:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 33:                 receiver.Close();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 34:             }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As shown below, this sample results in order 42 being received by the QueueClient:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-Queues--Topics-Rel_D1C0/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 2px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-Queues--Topics-Rel_D1C0/image_thumb.png" width="807" height="127" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;br /&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Topics&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;&lt;b&gt;May/June CTP&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;&lt;b&gt;General Availability&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;
        &lt;p&gt;&lt;b&gt;Comments&lt;/b&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;Topic&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;TopicDescription&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;
        &lt;p&gt;In May/June CTP, Topic / Queue / Subscription were management objects. All create/delete operations were moved to NamespaceManager and the state operations are now on TopicDescription/QueueDescription etc.&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;TopicClient&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;TopicClient&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;
        &lt;p&gt;As noted in the Queues section, you can use TopicClient or MessageSender in the event you want to abstract details of using Topics.&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;SubscriptionClient&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;SubscriptionClient&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;
        &lt;p&gt;As noted in the Queues section, you can use SubscriptionClient or MessageReceiver in the event you want to abstract details of using a Topic/Subscription.&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;Subscription&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;SubscriptionDescription&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;Changes to constructors and use of properties (see code samples below), but intent is the same.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;RuleDescription&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;RuleDescription&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;Changes to constructors and use of properties (see code samples below), but intent is the same.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;FilterExpression&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;Filter&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt;
        &lt;p&gt;Base for Filter types such as SqlFilter&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;SqlFilterExpression&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;SqlFilter&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt; &lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="268"&gt;
        &lt;p&gt;FilterAction&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="239"&gt;
        &lt;p&gt;RuleAction&lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="566"&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Below is a representative sample for creating, configuring, sending and receiving a message on a topic:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Administrative Operations&lt;/strong&gt;&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 836px; padding-right: 5px; height: 632px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1:             &lt;span style="color: #008000"&gt;// Configure and create NamespaceManager for performing administrative operations&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:             NamespaceManagerSettings settings = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NamespaceManagerSettings();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:             settings.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuer, key);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:             NamespaceManager manager = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NamespaceManager(ServiceBusEnvironment.CreateServiceUri("&lt;span style="color: #8b0000"&gt;sb&lt;/span&gt;", serviceNamespace, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty), settings);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:             &lt;span style="color: #008000"&gt;// Check for existence of topics on the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7:             var topics = manager.GetTopics();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:             var result = from t &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; topics
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:                          where t.Path.Equals(topicName, StringComparison.OrdinalIgnoreCase)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:                          select t;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13:             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (result.Count() == 0)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Topic does not exist&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17:                 &lt;span style="color: #008000"&gt;// Create Queue&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Creating Topic...&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20:                 TopicDescription topic = manager.CreateTopic(topicName);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21:             }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 22: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 23:             &lt;span style="color: #008000"&gt;// Create Subscriptions for InventoryServiceSubscription and CreditServiceSubscription and associate to OrdersTopic:&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 24:             SubscriptionDescription inventoryServiceSubscription = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SubscriptionDescription(topicName, "&lt;span style="color: #8b0000"&gt;InventoryServiceSubscription&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 25:             SubscriptionDescription creditServiceSubscription = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SubscriptionDescription(topicName, "&lt;span style="color: #8b0000"&gt;CreditServiceSubscription&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 26: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 27: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 28:             &lt;span style="color: #008000"&gt;// Set up Filters for NorthAmericaFulfillmentServiceSubscription&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 29:             RuleDescription northAmericafulfillmentRuleDescription = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; RuleDescription();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 30:             northAmericafulfillmentRuleDescription.Filter = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlFilter("&lt;span style="color: #8b0000"&gt;CountryOfOrigin = 'USA' OR CountryOfOrigin ='Canada' OR CountryOfOrgin ='Mexico'&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 31:             northAmericafulfillmentRuleDescription.Action = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlRuleAction("&lt;span style="color: #8b0000"&gt;set FulfillmentRegion='North America'&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 32: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 33: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 34:             &lt;span style="color: #008000"&gt;// Create Subscriptions&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 35:             SubscriptionDescription northAmericaFulfillmentServiceSubscription = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SubscriptionDescription(topicName, "&lt;span style="color: #8b0000"&gt;NorthAmericaFulfillmentServiceSubscription&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 36: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 37:             &lt;span style="color: #008000"&gt;// Delete existing subscriptions&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 38:             &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; { manager.DeleteSubscription(topicName, inventoryServiceSubscription.Name); } &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; { };
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 39:             &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; { manager.DeleteSubscription(topicName, creditServiceSubscription.Name); } &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; { };
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 40:             &lt;span style="color: #0000ff"&gt;try&lt;/span&gt; { manager.DeleteSubscription(topicName, northAmericaFulfillmentServiceSubscription.Name); } &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; { };
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 41: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 42:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 43:             &lt;span style="color: #008000"&gt;// Add Subscriptions and Rules to Topic&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 44:             manager.CreateSubscription(inventoryServiceSubscription);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 45:             manager.CreateSubscription(creditServiceSubscription);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 46:             manager.CreateSubscription(northAmericaFulfillmentServiceSubscription, northAmericafulfillmentRuleDescription);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 47:             &lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runtime Operations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 842px; padding-right: 5px; height: 631px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1:             &lt;span style="color: #008000"&gt;// Create and Configure Messaging Factory to provision TopicClient&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:             MessagingFactorySettings runtimeSettings = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MessagingFactorySettings();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:             runtimeSettings.TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(issuer, key);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:             MessagingFactory messagingFactory = MessagingFactory.Create(ServiceBusEnvironment.CreateServiceUri("&lt;span style="color: #8b0000"&gt;sb&lt;/span&gt;",serviceNamespace,String.Empty),runtimeSettings);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:             &lt;span style="color: #008000"&gt;// Create Topic Client for sending messages to the Topic:&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7:             TopicClient client = messagingFactory.CreateTopicClient(topicName);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8:          
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:             &lt;span style="color: #008000"&gt;/***********************
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:              *** Send Operations ***
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:              ***********************/
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13:             &lt;span style="color: #008000"&gt;// Prepare BrokeredMessage and corresponding properties&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14:             Order order = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Order();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15:             order.OrderId = 42;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16:             order.Products.Add("&lt;span style="color: #8b0000"&gt;Kinect&lt;/span&gt;", 70.50M);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17:             order.Products.Add("&lt;span style="color: #8b0000"&gt;XBOX 360&lt;/span&gt;", 199.99M);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18:             order.Total = order.Products["&lt;span style="color: #8b0000"&gt;Kinect&lt;/span&gt;"] + order.Products["&lt;span style="color: #8b0000"&gt;XBOX 360&lt;/span&gt;"];
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20:             &lt;span style="color: #008000"&gt;// Set the body to the Order data contract&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21:             BrokeredMessage msg = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BrokeredMessage(order);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 22:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 23:             &lt;span style="color: #008000"&gt;// Set properties for use in RuleDescription&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 24:             msg.Properties.Add("&lt;span style="color: #8b0000"&gt;CountryOfOrigin&lt;/span&gt;", "&lt;span style="color: #8b0000"&gt;USA&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 25:             msg.Properties.Add("&lt;span style="color: #8b0000"&gt;FulfillmentRegion&lt;/span&gt;", "&lt;span style="color: #8b0000"&gt;&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 26:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 27:             &lt;span style="color: #008000"&gt;// Send the message to the OrdersTopic&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 28:             client.Send(msg);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 29:             client.Close();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 30:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 31:            &lt;span style="color: #008000"&gt;/**************************
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 32:              *** Receive Operations ***
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 33:            ****************************/
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 34:         
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 35:             BrokeredMessage recdMsg;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 36:             Order recdOrder;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 37: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 38:             &lt;span style="color: #008000"&gt;// Inventory Service Subscriber&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 39:             SubscriptionClient inventoryServiceSubscriber = messagingFactory.CreateSubscriptionClient(topicName, "&lt;span style="color: #8b0000"&gt;InventoryServiceSubscription&lt;/span&gt;",ReceiveMode.PeekLock);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 40:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 41:             &lt;span style="color: #008000"&gt;// Read the message from the OrdersTopic&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 42:             &lt;span style="color: #0000ff"&gt;while&lt;/span&gt; ((recdMsg = inventoryServiceSubscriber.Receive(TimeSpan.FromSeconds(5))) != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 43:             {   
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 44:                 &lt;span style="color: #008000"&gt;// Convert from BrokeredMessage to native Order&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 45:                 recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 46: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 47:                 &lt;span style="color: #008000"&gt;// Complete read, release and delete message from the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 48:                 inventoryServiceSubscriber.Complete(recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 49: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 50:                 Console.ForegroundColor = ConsoleColor.Green;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 51:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Received Order {0} \n\t on {1} \n\t with Message Id {2} \n\t and Lock Token {3}.&lt;/span&gt;", recdOrder.OrderId, "&lt;span style="color: #8b0000"&gt;Inventory Service Subscriber&lt;/span&gt;", recdMsg.MessageId, recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 52:             }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 53:             inventoryServiceSubscriber.Close();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 54: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 55:             &lt;span style="color: #008000"&gt;// Credit Service Subscriber&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 56:             SubscriptionClient creditServiceSubscriber = messagingFactory.CreateSubscriptionClient(topicName, "&lt;span style="color: #8b0000"&gt;CreditServiceSubscription&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 57: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 58:             &lt;span style="color: #008000"&gt;// Read the message from the OrdersTopic&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 59:             recdMsg = creditServiceSubscriber.Receive();
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 60: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 61:             &lt;span style="color: #008000"&gt;// Convert from BrokeredMessage to native Order&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 62:             recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 63: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 64:             &lt;span style="color: #008000"&gt;// Complete read, release and delete message from the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 65:             creditServiceSubscriber.Complete(recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 66: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 67:             Console.ForegroundColor = ConsoleColor.Green;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 68:             Console.WriteLine("&lt;span style="color: #8b0000"&gt;Received Order {0} \n\t on {1} \n\t with Message Id {2} \n\t and Lock Token {3}.&lt;/span&gt;", recdOrder.OrderId, "&lt;span style="color: #8b0000"&gt;Credit Service Subscriber&lt;/span&gt;", recdMsg.MessageId, recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 69: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 70:             creditServiceSubscriber.Close();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 71: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 72:             &lt;span style="color: #008000"&gt;// Fulfillment Service Subscriber for the North America Fulfillment Service Subscription&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 73:             SubscriptionClient northAmericaFulfillmentServiceSubscriber = messagingFactory.CreateSubscriptionClient(topicName, "&lt;span style="color: #8b0000"&gt;northAmericaFulfillmentServiceSubscription&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 74:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 75:             &lt;span style="color: #008000"&gt;// Read the message from the OrdersTopic for the North America Fulfillment Service Subscription&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 76:             recdMsg = northAmericaFulfillmentServiceSubscriber.Receive(TimeSpan.FromSeconds(5));
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 77: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 78:             
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 79:            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(recdMsg != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 80:             {
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 81:                 &lt;span style="color: #008000"&gt;// Convert from BrokeredMessage to native Order&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 82:                 recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 83: 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 84:                 &lt;span style="color: #008000"&gt;// Complete read, release and delete message from the fabric&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 85:                 northAmericaFulfillmentServiceSubscriber.Complete(recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 86: 
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 87:                 Console.ForegroundColor = ConsoleColor.Green;
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 88:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;Received Order {0} \n\t on {1} \n\t with Message Id {2} \n\t and Lock Token {3}.&lt;/span&gt;", recdOrder.OrderId, "&lt;span style="color: #8b0000"&gt;North America Fulfillment Service Subscriber&lt;/span&gt;", recdMsg.MessageId, recdMsg.LockToken);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 89:             }
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 90:             &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 91:             {
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 92:                 Console.ForegroundColor = ConsoleColor.Yellow;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 93:                 Console.WriteLine("&lt;span style="color: #8b0000"&gt;No messages for North America found.&lt;/span&gt;");
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 94:             }
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 95:             
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 96:             northAmericaFulfillmentServiceSubscriber.Close();&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When running this sample, you’ll see that I have received Order 42 on my Inventory, Credit and North America Fulfillment Service subscriptions:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-Queues--Topics-Rel_D1C0/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 2px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-Queues--Topics-Rel_D1C0/image_thumb_2.png" width="802" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;WCF&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the great things about the WCF programming model is that it abstracts much of the underlying communication details and as such, other than dropping in a new assembly and and refactoring the binding and configuration, it is not greatly affected by the API changes from the May/June CTP to GA.&lt;/p&gt;

&lt;p&gt;As I mentioned, one thing that has changed is that the ServiceBusMessagingBinding has been renamed to NetMessagingBinding. I’ll be covering and end to end example of using the NetMessagingBinding in my upcoming article in &lt;a href="http://www.code-magazine.com/SearchResults.aspx?search=garibay" target="_blank"&gt;CODE Magazine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;REST API&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The REST API is key to delivering these new capabilities across a variety of client platforms and remains largely unchanged, however one key change is how message properties are handled. Instead of individual headers for each, there is now one header with  all the properties JSON encoded. Please refer to the updated REST API Reference doc for details. I’ll also be covering and end-to-end example of using the REST API to write an read to/from a queue in my upcoming article in &lt;a href="http://www.code-magazine.com/SearchResults.aspx?search=garibay" target="_blank"&gt;CODE Magazine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;More Coming Soon&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As I mentioned, in my upcoming article in &lt;a href="http://www.code-magazine.com/SearchResults.aspx?search=garibay" target="_blank"&gt;CODE Magazine&lt;/a&gt;, I’ll cover the Why, What, and How behind Azure AppFabric Service Bus Brokered Messaging including end to end walkthroughs with the .NET Client API, REST API and WCF Binding. The November/December issue should be on newsstands (including Barnes and Noble) or your mailbox towards the end of October. You can also find the article online at &lt;a href="http://code-magazine.com"&gt;http://code-magazine.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Resources&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can learn more about this exciting release as well as download the GA SDK version 1.5 by visiting the following resources:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Azure AppFabric SDK 1.5:&lt;a title="http://www.microsoft.com/download/en/details.aspx?id=27421" href="http://www.microsoft.com/download/en/details.aspx?id=27421"&gt;http://www.microsoft.com/download/en/details.aspx?id=27421&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twitter.com/clemensv" target="_blank"&gt;Clemens Vasters&lt;/a&gt; on the May CTP: &lt;a title="http://vasters.com/clemensv/2011/05/16/Introducing+The+Windows+Azure+AppFabric+Service+Bus+May+2011+CTP.aspx" href="http://vasters.com/clemensv/2011/05/16/Introducing+The+Windows+Azure+AppFabric+Service+Bus+May+2011+CTP.aspx"&gt;http://vasters.com/clemensv/2011/05/16/Introducing+The+Windows+Azure+AppFabric+Service+Bus+May+2011+CTP.aspx&lt;/a&gt;  &lt;/li&gt;

  &lt;li&gt;Great video by &lt;a href="http://twitter.com/clemensv" target="_blank"&gt;Clemens Vasters&lt;/a&gt; on Brokered Messaging: &lt;a title="http://vasters.com/clemensv/2011/06/11/Understanding+Windows+Azure+AppFabric+Queues+And+Topics.aspx" href="http://vasters.com/clemensv/2011/06/11/Understanding+Windows+Azure+AppFabric+Queues+And+Topics.aspx"&gt;http://vasters.com/clemensv/2011/06/11/Understanding+Windows+Azure+AppFabric+Queues+And+Topics.aspx&lt;/a&gt;  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twitter.com/#!/dingha" target="_blank"&gt;David Ingham&lt;/a&gt; on Queues: &lt;a title="http://blogs.msdn.com//b/appfabric/archive/2011/05/17/an-introduction-to-service-bus-queues.aspx" href="http://blogs.msdn.com//b/appfabric/archive/2011/05/17/an-introduction-to-service-bus-queues.aspx"&gt;http://blogs.msdn.com//b/appfabric/archive/2011/05/17/an-introduction-to-service-bus-queues.aspx&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twitter.com/#!/dingha" target="_blank"&gt;David Ingham&lt;/a&gt; on Topics: &lt;a title="http://blogs.msdn.com//b/appfabric/archive/2011/05/25/an-introduction-to-service-bus-topics.aspx" href="http://blogs.msdn.com//b/appfabric/archive/2011/05/25/an-introduction-to-service-bus-topics.aspx"&gt;http://blogs.msdn.com//b/appfabric/archive/2011/05/25/an-introduction-to-service-bus-topics.aspx&lt;/a&gt;  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twitter.com/rickggaribay" target="_blank"&gt;My&lt;/a&gt; Introduction to Queues: &lt;a title="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx" href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx&lt;/a&gt;  &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://twitter.com/rickggaribay" target="_blank"&gt;My&lt;/a&gt; Introduction to Topics:&lt;a title="http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx" href="http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx"&gt;http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://rickgaribay.net/aggbug/315.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/09/14/azure-appfabric-service-bus-brokered-messaging-ga-amp-rude-ctp.aspx</guid>
            <pubDate>Wed, 14 Sep 2011 16:46:52 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/09/14/azure-appfabric-service-bus-brokered-messaging-ga-amp-rude-ctp.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/315.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/315.aspx</trackback:ping>
        </item>
        <item>
            <title>New in AppFabric June CTP: AppFabric Application</title>
            <link>http://rickgaribay.net/archive/2011/06/21/new-in-appfabric-june-ctp-appfabric-application.aspx</link>
            <description>&lt;p&gt;Just about a month following the &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;AppFabric May CTP&lt;/a&gt;, which featured exciting &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;new investments in AppFabric Service Bus Messaging&lt;/a&gt;, Microsoft has delivered a technology preview of the next wave of building composite solutions at enterprise scale with the &lt;a href="http://blogs.msdn.com/b/appfabric/archive/2011/06/20/announcing-the-windows-azure-appfabric-june-ctp.aspx"&gt;release of the AppFabric June CTP&lt;/a&gt; (to be clear, there are no changes to AppFabric Service Bus in this release).&lt;/p&gt;  &lt;p&gt;Composite applications are the evolution afforded us by the advancements of contract-first development and the trend towards packaging units of reuse into discrete, autonomous and interoperable services, be they domain-specific or addressing cross-cutting concerns such as security or caching. By separating concerns into units of work and composing them iteratively into larger solutions, complex systems can be planned, managed and developed in bite size pieces aiding in both planning, operations and developer economics. This approach is valuable to the development of enterprise solutions regardless of where they are deployed, but combined with a model for stitching these units of reuse together and a robust runtime and execution model that provides additional capabilities as a platform, AppFabric Applications capture the truest distillation of the value that can be obtained by building on the Azure platform today.&lt;/p&gt;  &lt;p&gt;Over a year and half ago, &lt;a href="http://rickgaribay.net/archive/2010/01/15/is-.net-a-great-disruptor-of-the-decade.aspx"&gt;I asked&lt;/a&gt; whether &lt;a href="http://rickgaribay.net/archive/2010/01/15/is-.net-a-great-disruptor-of-the-decade.aspx"&gt;.NET was a great disruptor of the decade&lt;/a&gt; and suggested that alone, .NET has certainly revolutionized the Microsoft developer platform, but combined with cloud computing has the potential to disrupt an entire industry. Today, AppFabric Applications give organizations investing in both cloud and hybrid a way to take full advantage of the Azure Service Model with first class support for WCF, WF Services and AppFabric Service Bus for building composite apps at very high enterprise scale. With caching, monitoring and persistence support equivalent to or better than Server AppFabric (parity of features has been a goal that I think Microsoft has kept and exceeded its promises on) and a scale out story that will form a new hosting paradigm across Appliance, Box and Cloud with AppFabric Container. This is the next evolution in the AppFabric platform vision and is a very important milestone.&lt;/p&gt;  &lt;p&gt;To learn more, there is an excellent video on AppFabric TV on Channel9 with &lt;a href="http://twitter.com/#!/_karandeep"&gt;Karan Anand&lt;/a&gt; which provides a great overview here: &lt;a title="http://channel9.msdn.com/Shows/AppFabric-tv/AppFabrictv-Announcing-the-Windows-Azure-AppFabric-June-CTP" href="http://channel9.msdn.com/Shows/AppFabric-tv/AppFabrictv-Announcing-the-Windows-Azure-AppFabric-June-CTP"&gt;http://channel9.msdn.com/Shows/AppFabric-tv/AppFabrictv-Announcing-the-Windows-Azure-AppFabric-June-CTP&lt;/a&gt;  &lt;/p&gt;  &lt;p&gt;In addition, &lt;a href="http://twitter.com/#!/_karandeep"&gt;Karan&lt;/a&gt; has posted a more detailed blog post here: &lt;a title="http://blogs.msdn.com/b/appfabric/archive/2011/06/20/introducing-windows-azure-appfabric-applications.aspx" href="http://blogs.msdn.com/b/appfabric/archive/2011/06/20/introducing-windows-azure-appfabric-applications.aspx"&gt;http://blogs.msdn.com/b/appfabric/archive/2011/06/20/introducing-windows-azure-appfabric-applications.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Kudos to &lt;a href="http://twitter.com/#!/_karandeep"&gt;Karan&lt;/a&gt;, my friend &lt;a href="http://twitter.com/#!/mwinkle"&gt;@mwinkle&lt;/a&gt; and team for a great preview into this exciting new way to provide an easy button for building composite services at enterprise scale.&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/311.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/06/21/new-in-appfabric-june-ctp-appfabric-application.aspx</guid>
            <pubDate>Wed, 22 Jun 2011 01:15:57 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/06/21/new-in-appfabric-june-ctp-appfabric-application.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/311.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/311.aspx</trackback:ping>
        </item>
        <item>
            <title>Exploring AppFabric Service Bus V2 May CTP: Topics</title>
            <link>http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx</link>
            <description>&lt;p&gt;In my previous &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;post&lt;/a&gt;, I discussed Azure &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;AppFabric Service Bus Queues&lt;/a&gt;, a key new capability in the first CTP of the Azure AppFabric Service Bus V2 release that was &lt;a href="http://blogs.msdn.com/b/appfabric/archive/2011/05/14/announcing-the-windows-azure-appfabric-ctp-may-and-june-releases.aspx"&gt;announced&lt;/a&gt; on May 17th.&lt;/p&gt;  &lt;p&gt;Queues are an important addition to Azure AppFabric Service Bus capabilities because they provide a solid foundation on which to build loosely coupled distributed messaging solutions. The natural decoupling of queues introduces a number of natural side effects that can further benefit non-functional quality attributes of your solution such as performance, scalability and availability. &lt;/p&gt;  &lt;p&gt;The graphic on the right is taken from my recent whitepaper &lt;a href="http://www.microsoft.com/en-us/cloud/developer/resource.aspx?resourceId=developing-and-extending-apps&amp;amp;fbid=JznnsphSt83"&gt;“Developing and Extending Apps for Windows Azure with Visual Studio”&lt;/a&gt;&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb.png" width="240" height="166" /&gt;&lt;/a&gt; and shows the perpetual mismatch of supply and demand of IT capacities. If we think of this mismatch as load on the Y axis being introduced over time, the result is either failure to deliver a service or spending too much on hardware. &lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_1.png" width="240" height="175" /&gt;&lt;/a&gt;The goal, then is to align the demand with capacity. &lt;/p&gt;  &lt;p&gt;Queues allow us to get closer to the drawing on the left because capacity can be tuned to scale as needed and at its own pace. This is effective because with queues, a consumer/worker can be throttled to only consume what it can handle. If the consumer/worker is offline, items in the queue will queue up, providing classic “store and forward” capabilities. If the consumer/worker is very busy, it will only consume the messages it is able to reliably pull from the queue. If we add more consumers/workers, each consumer/worker will consume messages at its optimal rate (determined by processing capacity, tuning, etc.), resulting in a natural distribution of work. Of course, stronger, more capable consumers/workers may consume more messages, but as long as there are messages in the queue, there is work to be done and the capacity can be allocated accordingly.&lt;/p&gt;  &lt;p&gt;As you can see, queues are a great pattern for building loosely coupled distributed solutions, and the ability to add consumers/workers to a process or message exchange in a manner that is transparent from the client/producer perspective makes queues even more useful. &lt;/p&gt;  &lt;p&gt;This is the idea behind topics. Before I dive into topics though, let’s talk about the problem that topics are trying to solve.&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 5px 2px 2px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_3.png" width="123" height="192" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 2px 5px 2px 2px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_2.png" width="123" height="179" /&gt;&lt;/a&gt;In distributed systems, it is useful to design message exchanges in terms of publishers and subscribers. Publishers are clients that are either sending a request-response message and will wait for a response; or are sending a single, one way message and expect no response. Subscribers care about these messages for one reason or another and thus subscribe to these messages. This is the essence of the Publish-Subscribe, or more succinct “Pub-Sub” messaging pattern. A one-way pub-sub  message exchange pattern is modeled to my left, and again to my right to build on a concrete example. Purchases, be they on-line or at brick-and-mortar retail outlets typically involve a point-of-sale (POS) system. &lt;/p&gt;  &lt;p&gt;One of the first things a smart, modern POS software does when a unit is sold is to update inventory on that product so that the company can make proactive, intelligent decisions about managing inventory levels. In most cases, this is an administrative function, that is (or should be) transparent to the customer. When an order/sale is placed, an event occurs which is of interest to an Inventory Service that is responsible for decrementing the inventory count on a shared store. Of course, this is just one of several things that likely need to happen when an order is placed. Credit card authorization as well as fulfillment (whatever that means in the context of the purchase) needs to take place as shown below on your left. &lt;/p&gt;  &lt;p&gt;All of a sudden things are more complex than they were before. I want to decouple the POS Client from the downstream business of authorizing a credit card and shipping the product to the customer’s doorstep. Depending on the context, the credit authorization process may be request-response or one-way. For most high-volume online retailers, the financial outcome of &lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 5px 5px 2px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_4.png" width="323" height="157" /&gt;&lt;/a&gt;the transaction is transparent to the purchasing experience. Ever gotten an email from Amazon.com after you made your purchase letting you know that your order is in a pending state because you need to update your expiration date on file so it can authorize your credit card? This asynchronous approach is common to facilitate scale and performance, and it is also good business. &lt;/p&gt;  &lt;p&gt;It is very important to note that when the credit card authorization is designed as one-way, there are a number of guarantees that must be made. First, the Credit Service &lt;em&gt;must&lt;/em&gt; receive the message, no matter how busy the front-end or back-end services are. Second, but of equal importance, is that the Credit Service &lt;em&gt;must&lt;/em&gt; receive the message &lt;em&gt;once and only once. &lt;/em&gt;Failure to deliver on the first or second guarantee will lead to lost revenue, either due to lost transactions or very disgruntled customers.&lt;/p&gt;  &lt;p&gt;Using queues is a first step towards achieving these desired outcomes. However, now we need to reason about who should have the responsibility of sending the message to each subscriber? It can’t be the POS Client, because we want to decouple it from this kind of intimate knowledge. Adding this responsibility to each subscriber is also just as bad, or arguably worse. &lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_5.png" width="250" height="249" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What we need is an intermediary that forms both a logical and physical relationship between publishers and subscribers such that the minimum degree of coupling is accomplished between the two and no more. This is exactly what a topic provides. &lt;/p&gt;  &lt;p&gt;Topics are nothing new. They have been the mainstay of JMS-based systems for years, and thus have proven their usefulness in the field of distributed computing as a great way to logically associate actions to events, thus achieving pub-sub in a minimally coupled manner. &lt;/p&gt;  &lt;p&gt;In our scenario, when a sale occurs, the POS Client publishes a message to the “Orders” topic to signal a new order event. At this point, corresponding subscribers are notified by the topic. This logical relationship is modeled to your right. Each one of the subscribers might receive a copy of the same message, in which case we would define the message exchange pattern as multi-cast. It is also possible-and likely- that each service exposes a different contract and thus, transformation between a canonical message and the expected message must take place, but this is a subject for a later post.&lt;/p&gt;  &lt;p&gt;How the subscribers receive the message, be it one-way or request-response, is a physical implementation decision. In the classic sense, the logical abstraction of a topic affords us some latitude in choosing a physical transport that will fuse the publisher and subscriber(s) together.  &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Theory aside, everything I am sharing here is based on my experience over the last few days jumping into these early bits. I am not an expert on the implementation of these capabilities or the features of the CTP and am merely sharing my learnings and thoughts as I explore these exciting new features. If you have questions, know of a different or better way to do something as it applies to the CTP, or have any any corrections, please use the comments below and I’ll gladly consider them and/or share them with the product team and post updates back here.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Exploring Azure AppFabric Service Bus V2&lt;/strong&gt; Topics&lt;/p&gt;  &lt;p&gt;In Azure AppFabric Service Bus V2, the physical transport used in Topics is Azure AppFabric Service Bus Queues, which allows us to harness the physical advantages of queues and the logical abstraction that topics provide to design our distributed solutions at internet scale.&lt;/p&gt;  &lt;p&gt;If you’ve played with the Azure AppFabric Service Bus Queues, or read my &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;introduction to this series&lt;/a&gt; you might be wondering what makes Azure AppFabric Service Bus Topic so special. So far, you might be thinking that we could accomplish much of what I’ve discussed with Queues and you wouldn’t be alone. I struggled with this initially as well. &lt;/p&gt;  &lt;p&gt;The way that Queues and Topics are implemented in the current technology preview, Topics don’t really seem all that useful until you want to refine &lt;em&gt;when &lt;/em&gt;or under &lt;em&gt;what conditions &lt;/em&gt;a Subscriber should receive a message beyond simply being subscribed to a Topic, and this can be pretty powerful.&lt;/p&gt;  &lt;p&gt;In fact, we can code the scenario shown in the &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;article on Queues&lt;/a&gt; to be functionally equivalent with Topics without immediately gaining much.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Creating&lt;/strong&gt; &lt;strong&gt;Topics&lt;/strong&gt; &lt;strong&gt;and Subscriptions&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Start by creating a ServiceBusNamespaceClient and MessagingFactory just as before:&lt;/p&gt;  &lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: ServiceBusNamespaceClient namespaceClient = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; ServiceBusNamespaceClient( &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:         ServiceBusEnvironment.CreateServiceUri( &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:         "&lt;span style="color: rgb(139,0,0)"&gt;sb&lt;/span&gt;", serviceNamespace,  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:         &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;.Empty),  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5:         sharedSecretCreds); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7: MessagingFactory messagingFactory = MessagingFactory.Create( &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8:     ServiceBusEnvironment.CreateServiceUri( &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:     "&lt;span style="color: rgb(139,0,0)"&gt;sb&lt;/span&gt;",  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:     serviceNamespace,  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:     &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;.Empty), &lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Next, create a Topic called “Orders”: &lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: Topic ordersTopic = namespaceClient.CreateTopic("&lt;span style="color: rgb(139,0,0)"&gt;Orders&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The underlying queue infrastructure is created for you.&lt;/p&gt;

&lt;p&gt;Now, create a subscription for the Inventory Service on the “Orders” topic:&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: Subscription inventoryServiceSubscription = ordersTopic.AddSubscription("&lt;span style="color: rgb(139,0,0)"&gt;InventoryServiceSubscription&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;At this point, the creation of the Topic and Subscription above would take place in a management context without regard to, or any knowledge of the actual publisher or subscriber(s). &lt;/p&gt;

&lt;p&gt;I would expect tooling either from Microsoft or the community or both to start to crop up soon to provide a user experience for these types of management chores, including the ability to enumerate Queues, &lt;b style="background-color: #a0ffff; color: black"&gt;Topics&lt;/b&gt;, etc. For example, before I create a Topic, I need to ensure that the Topic doesn’t already exist or I will get an &lt;a href="http://twitter.com/#!/rickggaribay/status/74226182958227457"&gt;MessagingEntityAlreadyExistsException&lt;/a&gt;. I used the GetQueues method on the namespace client, and if the Topic or Queue entity exists, use the DeleteQueue or DeleteTopic method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Publishing on a Topic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, the client/publisher creates a TopicClient and MessageSender and sends the message on the Orders Topic:&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: TopicClient pOSClientPublisher = messagingFactory.CreateTopicClient("&lt;span style="color: rgb(139,0,0)"&gt;Orders&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3: MessageSender msgSender = pOSClientPublisher.CreateSender(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5: Order order = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; Order(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6: order.OrderId = 42; &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7: order.Products.Add("&lt;span style="color: rgb(139,0,0)"&gt;Kinect&lt;/span&gt;", 70.50M); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8: order.Products.Add("&lt;span style="color: rgb(139,0,0)"&gt;SamsungFocus&lt;/span&gt;", 199.99M); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9: order.Total = order.Products["&lt;span style="color: rgb(139,0,0)"&gt;Kinect&lt;/span&gt;"] + order.Products["&lt;span style="color: rgb(139,0,0)"&gt;SamsungFocus&lt;/span&gt;"]; &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11: var msg = BrokeredMessage.CreateMessage(order); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12:             &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13: msgSender.Send(msg); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14: msgSender.Close();&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Note that the client/publisher knows nothing about the subscriber. It is only bound to a logical Topic called “Orders” on line 1 above. It is running in some other process somewhere in the world (literally) that has an internet connection and can make an outbound connection on TCP port 9354***.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subscribing to a Topic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On the receiving end, a SubscriptionClient is created along with a MessageReciever. The SubscriptionClient instance is created from the MessagingFactory instance which accepts the name of the topic and the subscription itself.&lt;/p&gt;

&lt;p&gt;Note the RecieveMode is the same as before which will have the effect of ensuring that the Inventory Service Subscriber receives the message at most once (FWIW, I think PublisherClient and SubscriberClient make more sense that SubscriptionClient and TopicClient respectively, but the intent of the classes is pretty clear and again, these are early bits so expect changes as the team gets feedback and continues to bake the API):&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: SubscriptionClient inventoryServiceSubscriber = messagingFactory.CreateSubscriptionClient("&lt;span style="color: rgb(139,0,0)"&gt;Orders&lt;/span&gt;", "&lt;span style="color: rgb(139,0,0)"&gt;InventoryServiceSubscription&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2:              &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3: MessageReceiver msgReceiver = inventoryServiceSubscriber.CreateReceiver(ReceiveMode.PeekLock); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5: var recdMsg = msgReceiver.Receive(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6: msgReceiver.Close(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8: var recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10: Console.WriteLine("&lt;span style="color: rgb(139,0,0)"&gt;Received Order {0} on {1}.&lt;/span&gt;", recdOrder.OrderId, "&lt;span style="color: rgb(139,0,0)"&gt;Inventory Service Subscriber&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The code above would be wrapped into a polling algorithm that allows you to have fine control over the polling interval, which as Clemens Vasters pointed out in a side conversation recently is a key capability that allows you to throttle your subscribers. The samples in the SDK show a polling technique which works, but it would be nice to see an option for setting some config and letting the API do this for you. &lt;/p&gt;

&lt;p&gt;Regardless of the approach you take to checking for messages, the only thing the subscriber knows about is the Topic name and the name of the subscription on line 1 above (having to provide the subscription name in addition to the topic name, seems a bit redundant to me and more coupling than is needed). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Subscribers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At this point, we’ve emulated the functionality of the &lt;a href="http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx"&gt;Queuing example shown in my first post in the series&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While we’ve increased our level of abstraction, and are no longer thinking about (or care) about the fact that there’s a queue in between the publisher and subscriber, so far, topics haven’t bought us much just yet…&lt;/p&gt;

&lt;p&gt;Think back to the scenario above. There are two other services that care about orders. We can create subscriptions for them just as we did for the Inventory Service at management/configuration time:&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: Subscription fulfillmentServiceSubscription = ordersTopic.AddSubscription("&lt;span style="color: rgb(139,0,0)"&gt;FulfillmentServiceSubscription&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2: Subscription creditServiceSubscription = ordersTopic.AddSubscription("&lt;span style="color: rgb(139,0,0)"&gt;CreditServiceSubscription&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Of course, new subscriptions can be added long after the Topic has been created, and this is one of the many powerful aspects of this logical abstraction from publishers and subscribers. This approach introduces agility into your solutions because you can add subscribers with minimal friction, and in a fully location transparent manner.&lt;/p&gt;

&lt;p&gt;As with the publisher (TopicClient), subscribers (SubscriberClients) live in their own process anywhere in the world with an internet connection and can be fired up at will. If one is offline, or unavailable, the message will be queued (provided that previous subscribers have peeked the message (ReceiveMode.PeekLock) as opposed to popping it off the queue (ReceiveMode.ReceiveAndDelete). Below is the simple code for adding listeners/Subscribers for the Credit Service and Fulfillment Service:&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: // Credit Service Subscriber &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2: SubscriptionClient creditServiceSubscriber = messagingFactory.CreateSubscriptionClient("&lt;span style="color: rgb(139,0,0)"&gt;Orders&lt;/span&gt;", "&lt;span style="color: rgb(139,0,0)"&gt;CreditServiceSubscription&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  4: msgReceiver = creditServiceSubscriber.CreateReceiver(ReceiveMode.PeekLock); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  5: recdMsg = msgReceiver.Receive(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  6: msgReceiver.Close(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  7:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  8: recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  9:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 10: Console.WriteLine("&lt;span style="color: rgb(139,0,0)"&gt;Received Order {0} on {1}.&lt;/span&gt;", recdOrder.OrderId, "&lt;span style="color: rgb(139,0,0)"&gt;Credit Service Subscriber&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 11:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 12: // Fulfillment Service Subscriber &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 13: SubscriptionClient fulfillmentServiceSubscriber = messagingFactory.CreateSubscriptionClient("&lt;span style="color: rgb(139,0,0)"&gt;Orders&lt;/span&gt;", "&lt;span style="color: rgb(139,0,0)"&gt;FulfillmentServiceSubscription&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 14:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 15: msgReceiver = fulfillmentServiceSubscriber.CreateReceiver(ReceiveMode.PeekLock); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 16: recdMsg = msgReceiver.Receive(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 17: msgReceiver.Close(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 18:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 19: recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 20:  &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; 21: Console.WriteLine("&lt;span style="color: rgb(139,0,0)"&gt;Received Order {0} on {1}.&lt;/span&gt;", recdOrder.OrderId, “&lt;span style="color: rgb(139,0,0)"&gt;Fulfillment Service Subscriber&lt;/span&gt;"&lt;span style="color: rgb(139,0,0)"&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Creati&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 4px 0px 4px 2px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/image_thumb_7.png" width="415" height="53" /&gt;&lt;/a&gt;ng two additional SubscriptionClients for the Credit Service and Fulfillment Service results in all three subscribers getting the message as shown on the right. Again, in my examples, I am running each subscriber in the same process, but in the real world, these subscribers could be deployed anywhere in the world provided they can establish a connection to TCP 9354.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules/Actions, Sessions/Groups&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, what if we wanted to partition the subscribers such that in addition to subscribing to a Topic, additional logic could be evaluated to determine if the subscribers are really interested in the message? Our online retailer probably (err, hopefully) has a centralized inventory management system and credit card processor, but may have different fulfillment centers across the world. &lt;/p&gt;

&lt;p&gt;Based on the customer’s origin, the order should go to the closest fulfillment center to minimize cost and ship times (i.e. North America, South America, Africa, East, Europe, Asia, Australia).&lt;/p&gt;

&lt;p&gt;Azure AppFabric Service Bus V2 supports this approach with Sessions, Rules and Actions. I group these into the idea of a message pipeline. In addition to the subscriptions, the Topic evaluates additional context or content of the published message configured at management time to introduce some additional filtering and very lightweight orchestration. The topic subscription is the right place for this to happen because again, it is a management-time task. Publishers and subscribers merely send/receive messages. It is the benefit of a logically centralized, yet physically distributed messaging model that affords us the ability to manage these details in a centralized way.&lt;/p&gt;

&lt;p&gt;You can create a RuleDescription to evaluate some property or field in the message that indicates country of origin, and as an action, set a property on the message to identify the fulfillment center.&lt;/p&gt;

&lt;p&gt;To illustrate this, first, I’ve added two properties to the BrokerMessage that I am publishing on the “Orders” Topic. I’ll use these properties when I configure my rule and action next:&lt;/p&gt;

&lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: msg.Properties.Add("&lt;span style="color: rgb(139,0,0)"&gt;CountryOfOrigin&lt;/span&gt;", "&lt;span style="color: rgb(139,0,0)"&gt;USA&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2: msg.Properties.Add("&lt;span style="color: rgb(139,0,0)"&gt;FulfillmentRegion&lt;/span&gt;", "&lt;span style="color: rgb(139,0,0)"&gt;&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;font face="Verdana"&gt;Notice that in line 2 above, I’ve intentionally created the “FulfillmentRegion” property with an empty string, since we are going to apply some logic to determine the fulfillment region. &lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font face="Verdana"&gt;Now, I use a RuleDescription and SqlFilterExpression to determine if the CountryOfOrigin is the United States. If the SqlFilterExpression evaluates to true, then the SqlFilterAction fires and sets the FulfillmentRegion  to “North America”:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
  &lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: RuleDescription fulfillmentRuleDescription = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; RuleDescription(); &lt;/pre&gt;
&lt;pre style="background-color: rgb(255,255,255); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  2: fulfillmentRuleDescription.FilterExpression = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; SqlFilterExpression("&lt;span style="color: rgb(139,0,0)"&gt;CountryOfOrigin = 'USA'&lt;/span&gt;"); &lt;/pre&gt;
&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  3: fulfillmentRuleDescription.FilterAction = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; SqlFilterAction("&lt;span style="color: rgb(139,0,0)"&gt;set fulfillmentRegion='North America'&lt;/span&gt;");&lt;/pre&gt;&lt;/pre&gt;

  &lt;p&gt;Of course, in the real world, there would be a more sophisticated process for identifying the country of origin, but simple, contrived examples make it so that articles get published. &lt;img class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP-Topics_12716/wlEmoticon-winkingsmile_2.png" /&gt;&lt;/p&gt;

  &lt;p&gt;The evaluation and any corresponding actions must fire when the message is in-flight as any actions taken could influence the routing of the message, as with the example above which will meet a subscription rule we’ll configure on the Fulfillment Service Description next. &lt;/p&gt;

  &lt;p&gt;OK, so now we have some properties we can play with and we’ve defined a RuleDescription. The last thing we need to do is modify the FulfillmentServiceSubscription to include the RuleDescription I just created. This makes the FulfillmentSubscription conditional, based on the conditions we've defined in the instance of the RuleDescription called fulfillmentRuleDescription:&lt;/p&gt;

  &lt;pre style="border-bottom: rgb(206,206,206) 1px solid; border-left: rgb(206,206,206) 1px solid; padding-bottom: 5px; background-color: rgb(251,251,251); min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: rgb(206,206,206) 1px solid; border-right: rgb(206,206,206) 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: rgb(251,251,251); margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;  1: Subscription fulfillmentServiceSubscription = ordersTopic.AddSubscription("&lt;span style="color: rgb(139,0,0)"&gt;FulfillmentServiceSubscription&lt;/span&gt;", fulfillmentRuleDescription);&lt;/pre&gt;&lt;/pre&gt;

  &lt;p&gt;
    &lt;br /&gt;Now, when I run my code, all three subscribers receive the order message just as before, however this time, we know that the only reason that the Fulfillment Service is getting the message is because it is acting as the North America fulfillment center. If I modify the CountryOfOrigin property in line 1 in the 3rd code sample up from here to anything but “North America” the Fulfillment Service will not receive the message at all.&lt;/p&gt;

  &lt;p&gt;As I continue to model out my subscribers, I could create a subscription for each fulfillment center that is capable of receiving real-time orders and then create RuleDescriptions accordingly. This would allow me to distribute fulfillment geographically (good for scale, reliability and happy customers) as well as ensuring that I am always only pulling back messages that I need. If, during peak times around holidays, the volume of orders increases, I can simply add additional fulfillment subscribers for that region to ensure that packages ship as quickly as possible and that no orders are lost.&lt;/p&gt;
&lt;/font&gt;

&lt;p&gt;&lt;strong&gt;Closing Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So far, I’m pretty impressed with the powerful messaging capabilities that Azure AppFabric Service Bus V2 Topics introduced in the May CTP, and I’m excited to see where things are going.&lt;/p&gt;

&lt;p&gt;As Azure AppFabric Service Bus matures further, I would love to see additional transport channels supported by Azure AppFabric Service Bus Topics. Just as with the creation of the Topic and Subscriptions as a management function, the transport would also be defined and created/configured at management time. This is really where the power and elegance of Topics shines through in my opinion because the publisher and subscriber don’t know or care about the transport- they’re just connecting to a topic and sending and/or receiving messages.&lt;/p&gt;

&lt;p&gt;By way of some nit picks, I think that PublisherClient makes more sense than TopicClient, and along with considering a modification to SubscriptionClient, having a PublisherClient and SubscriberClient that publish and subscribe to a Topic seems a lot cleaner and more intuitive to me.&lt;/p&gt;

&lt;p&gt;I’m also trying to get used the fact that we need Clients &lt;em&gt;and&lt;/em&gt; Senders/Receivers. Again, to me it would seem more intuitive to simply have a PublisherClient and SubscriberClient that own the sending and receiving. Perhaps we’re jus seeing visible seams in the API due to the early nature, or there’s a good reason for this that I haven’t thought of yet.&lt;/p&gt;

&lt;p&gt;At PDC 10, the AppFabric team announced that they are investing in an “Integration Service” that will provide additional messaging capabilities by way of transformation and advanced mapping similar to how we leverage these capabilities in BizTalk today. I can see Topics getting much more robust when, in addition to modifying properties on the BrokerMessage, we can mediate and transform a message in-flight just before reaching a subscriber, and I can also think of some nice message enrichment patterns that would be very nice. &lt;/p&gt;

&lt;p&gt;*** One important thing to note is that in the current May CTP, Queues and Topics do not provide the same NAT/Firewall traversal capabilities of their relay siblings. For the .NET Messaging API (which I’ve been using to share my learnings thus far) as well as the WCF ServiceBusMessagingBinding, outbound TCP 9354 is required. Also note that the channel type is Net.Tcp (think WCF). This means that in the current CTP, the only way to ensure full interoperability across publishers/subscribers and guarantee an outbound connection (assuming HTTP ports aren’t locked down) is to use the REST API, but I suspect we’ll see more parity of this important feature across client types for Queues and Topics. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s Next?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There’s still much to explore around sessions, filtering, the WCF ServiceBusMessagingBinding, the REST API and how we might bridge Azure AppFabric Service Bus with on-premise messaging capabilities. Exciting stuff- stay tuned!&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/309.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx</guid>
            <pubDate>Tue, 31 May 2011 10:23:00 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/05/31/exploring-appfabric-service-bus-v2-may-ctp-topics.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/309.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/309.aspx</trackback:ping>
        </item>
        <item>
            <title>Exploring Azure AppFabric Service Bus V2 May CTP: Queues</title>
            <link>http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx</link>
            <description>&lt;p&gt;Today, the AppFabric team &lt;a href="http://blogs.msdn.com/b/appfabric/archive/2011/05/14/announcing-the-windows-azure-appfabric-ctp-may-and-june-releases.aspx" target="_blank"&gt;announced&lt;/a&gt; the first Community Technology Preview of the Azure AppFabric Service Bus V2.&lt;/p&gt;  &lt;p&gt;The second release of Azure AppFabric Service bus is a significant milestone that the team has been hard at work on for several months. While I’ve had the privilege of attending a number of SDRs and watching this release move from ideation to actual bits, this is the first time I’ve been able to actually get my hands on the code, so I’ve spent the better part of this evening diving in.&lt;/p&gt;  &lt;p&gt;First, if you are new to the Azure AppFabric Service Bus, there are many resources available to get you up to speed. I highly recommend this whitepaper by Aaron Skonnard: &lt;a title="A Developer’s Guide to the Service Bus" href="http://download.microsoft.com/download/F/D/8/FD863D17-E85E-478C-B06F-6825D50EA103/A%20Developer's%20Guide%20to%20Service%20Bus%20in%20Windows%20Azure%20platform%20AppFabric.docx"&gt;&lt;font color="#f79646"&gt;A Developer’s Guide to the Service Bus&lt;/font&gt;&lt;/a&gt;. If you are a visual learner, please consider checking out my webcast on AppFabric Service Bus here: &lt;a title="http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx" href="http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx"&gt;http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In a nutshell, like most ESBs, Azure AppFabric Service Bus is the manifestation of a number of &lt;a href="http://www.code-magazine.com/articleprint.aspx?quickid=1009051&amp;amp;printmode=true" target="_blank"&gt;core messaging patterns&lt;/a&gt; that provide the ability to design messaging solutions that are loosely coupled. What makes the Azure AppFabric Service Bus unique is that it provides these capabilities at “internet scale”, meaning that it is designed to decouple clients and services regardless of whether they are running on premise or in the cloud. As a result, the AppFabric Service Bus is a key technology for enabling &lt;a href="http://rickgaribay.net/archive/2011/05/02/microsoft-business-integration-roadshowndashthe-goods.aspx" target="_blank"&gt;hybrid&lt;/a&gt; scenarios at the platform level (i.e. PaaS) and serves as a key differentiator in the market today for enabling organizations to adopt cloud computing in a pragmatic way.&lt;/p&gt;  &lt;p&gt;Messaging patterns in general provide a common frame on which to think about and build &lt;a href="http://rickgaribay.net/archive/2011/05/02/microsoft-business-integration-roadshowndashthe-goods.aspx" target="_blank"&gt;composite&lt;/a&gt; applications. Cloud and hybrid computing necessitate many of the same messaging patterns found within the on-premise enterprise and introduce new complexities that are somewhat unique.  &lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP_11FB7/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 9px 2px 2px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/AppFabric-Service-Bus-V2-CTP_11FB7/image_thumb.png" width="244" height="150" /&gt;&lt;/a&gt;Azure AppFabric Service Bus V2 introduces tried and true messaging capabilities such as Queues, Topics, Pipes and Filters (Rules/Actions) as well as sequencing semantics and of course durability. &lt;/p&gt;  &lt;p&gt;It is important to note that the Azure AppFabric Service Bus is not a replacement for on-premise publish-subscribe messaging. It enables new scenarios that allow you to integrate your current on-premise messaging and provide the ability to compose clouds, be they your own, your partners or those of private cloud providers such as Microsoft. The drawing on the right is from the Microsoft whitepaper I mentioned in the introduction. Notice that the Azure AppFabric Service Bus is providing the ability to integrate clients and services regardless of where they reside, and for non-trivial SOA, on-premise pub-sub for decoupling composed services and clients is essential.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Queues&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Queues are typically used to provide temporal decoupling, which provides support for occasionally connected clients and/or services. With a queue, a client writes to a known endpoint (private/local or public/somewhere on the network) without regard to the state of the downstream service. If the service/consumer is running, it will read work items or messages from the queue. Otherwise, the queue will retain the message(s) until the service is available to retrieve the message or the message expires. &lt;/p&gt;  &lt;p&gt;As promised, Azure AppFabric Service Bus V2 delivers on durable messaging capabilities beyond the current Message Buffer feature with the introduction of Queues. &lt;/p&gt;  &lt;p&gt;Queues are supported in the .NET API (shown below), REST API and with a new WCF Binding called “ServiceBusMessagingBinding”. While my preferred approach will certainly be WCF, the .NET API helps to understand the new API. In addition, the process of creating a queue is required even with WCF since queue creation is outside of WCF’s immediate area of concern.&lt;/p&gt;  &lt;p&gt;The first thing you need to do when working with Queues, Topics and Subscribers is create a Service Bus Namespace Client which is an anchor class for managing Service Bus entities:&lt;/p&gt; &lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;  &lt;pre class="csharpcode"&gt;ServiceBusNamespaceClient namespaceClient = &lt;span class="kwrd"&gt;new&lt;/span&gt; 
ServiceBusNamespaceClient(ServiceBusEnvironment.CreateServiceUri(&lt;span class="str"&gt;"sb"&lt;/span&gt;, 
serviceNamespace, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty), 
sharedSecretCreds);&lt;/pre&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;div class="csharpcode"&gt; &lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Once you have an instance of the ServiceBusNamespaceClient, you can create a queue by simply instantiating the Microsoft.ServiceBus.Messaging.Queue class (I’ve set the queueName field to “Orders”):&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt;  &lt;/span&gt;Queue queue = namespaceClient.CreateQueue(queueName);&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;font face="Verdana"&gt;Next, create a Queue client. The Queue Client manages both send and receive operations:&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre style="width: 95.39%; height: 40px" class="alt"&gt;&lt;p&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;  MessagingFactory messagingFactory = &lt;/p&gt;&lt;p&gt;MessagingFactory.Create(ServiceBusEnvironment.CreateServiceUri(&lt;span class="str"&gt;"sb"&lt;/span&gt;, serviceNamespace, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty), sharedSecretCreds);&lt;/p&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;var queueClient = messagingFactory.CreateQueueClient(queue);&lt;/pre&gt;

  &lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;The code above uses the Microsoft.ServiceBus.Messaging.MessagingFactory which accepts your namespace and security credentials and returns an instance of the MessagingFactory. &lt;/p&gt;&lt;style type="text/css"&gt;&lt;![CDATA[





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Next, you create an instance of Microsoft.ServiceBus.Messaging.MessageSender using the CreateSender method:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre style="width: 42.45%; height: 20px" class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;var messageSender = queueClient.CreateSender();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;messageSender.Send(msg);&lt;/pre&gt;

  &lt;pre style="width: 42.4%; height: 20px" class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;messageSender.Close();&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;&lt;/font&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;Line 7 below creates a BrokeredMessage, which is a new message class which represents a unit of communication between Service Bus clients. Note that this class has nothing to do with the System.ServiceModel.Channels Message class, however when using the ServiceBusMessagingBinding the classic WCF Message class is used. The BrokeredMessage class consists of a number of methods and some interesting properties including ContentType, CorrelationId, MessageId, Label and a property bag called Properties which we’ll explore as we progress through the new features.&lt;/font&gt;&lt;/div&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;&lt;/font&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;In this example, I’m using an overload of CreateMessage that accepts a serializable object. The method uses the DataContractSerializer with a a binary XmlDictionaryWriter to create a BrokeredMessage.&lt;/font&gt;&lt;/div&gt;

&lt;div class="csharpcode"&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;Order order = &lt;span class="kwrd"&gt;new&lt;/span&gt; Order();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;order.OrderId = 42;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;order.Products.Add(&lt;span class="str"&gt;"Kinect"&lt;/span&gt;,70.50M);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;order.Products.Add(&lt;span class="str"&gt;"SamsungFocus"&lt;/span&gt;, 199.99M);&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;order.Total = order.Products[&lt;span class="str"&gt;"Kinect"&lt;/span&gt;] + order.Products[&lt;span class="str"&gt;"SamsungFocus"&lt;/span&gt;];&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;var msg = BrokeredMessage.CreateMessage(order);&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Finally, we can send the message:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;var messageSender = queueClient.CreateSender();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;messageSender.Send(msg);&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;messageSender.Close();&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;With much of the infrastructure code out of the way, we can use the same queueClient instance to create a MessageReciever and request the BrokeredMessage message from the Orders queue:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;var messageReceiver = queueClient.CreateReceiver(ReceiveMode.ReceiveAndDelete);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;var recdMsg = messageReceiver.Receive();&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;messageReceiver.Close();&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt; &lt;/div&gt;

&lt;p&gt;Note the ReceiveMode in line 1 above. This has the effect of enforcing an &lt;strike&gt;“Exactly-Once”&lt;/strike&gt; “At Most Once” (thanks David Ingham) receive semantic since the first consumer to read the message will pop it off the queue. The opposite option is RecieveMode.PeekLock which provides “At Least Once” delivery semantics. As David Ingham, Program Manager on the AppFabric team kindly adds in his comments below: “If the consumer is able to record the MessageIds of messages that it has processed then you can achieve “ExactlyOnce” processing semantics with PeekLock mode too.” –Thanks David!&lt;/p&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;Once we have the BrokeredMessage, we can retrieve the body:&lt;/font&gt;&lt;/div&gt;

&lt;div class="csharpcode"&gt;&lt;font face="Verdana"&gt;&lt;/font&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;var recdOrder = recdMsg.GetBody&amp;lt;Order&amp;gt;();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;Console.WriteLine(&lt;span class="str"&gt;"Received Order {0} with total of ${1}"&lt;/span&gt;,recdOrder.OrderId,recdOrder.Total);&lt;/pre&gt;

  &lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;&lt;style type="text/css"&gt;&lt;![CDATA[



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;The cool thing about the CTP is that Microsoft is offering you a &lt;a href="https://portal.appfabriclabs.com/"&gt;free labs environment&lt;/a&gt; in which to explore and play. In the CTP, you can create a maximum of 100 queues, with a maximum size of 100MB each and messages can not exceed a payload size of 256KB- pretty workable constraints for a first CTP.&lt;/p&gt;

&lt;p&gt;To get started, and dive in for yourself, be sure to download the Azure &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D89640FC-C552-446E-AEAD-B1E0D940F31B"&gt;AppFabric V2 SDK&lt;/a&gt; at: &lt;a title="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D89640FC-C552-446E-AEAD-B1E0D940F31B" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D89640FC-C552-446E-AEAD-B1E0D940F31B"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=D89640FC-C552-446E-AEAD-B1E0D940F31B&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my next post, we’ll explore &lt;strong&gt;Topics and Subscriptions&lt;/strong&gt; which allow for rich pub-sub including the ability to multicast to thousands of potential subscribers. &lt;/p&gt;

&lt;p&gt;Hats off to the AppFabric Messaging team for all of their hard work with this release!&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/306.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx</guid>
            <pubDate>Tue, 17 May 2011 07:17:18 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/05/17/appfabric-service-bus-v2-ctp.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/306.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/306.aspx</trackback:ping>
        </item>
        <item>
            <title>Microsoft Business Integration Roadshow&amp;ndash;The Goods</title>
            <link>http://rickgaribay.net/archive/2011/05/02/microsoft-business-integration-roadshowndashthe-goods.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Microsoft-Business-Integration-Roadshow_8395/clip_image002_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" hspace="12" alt="clip_image002" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Microsoft-Business-Integration-Roadshow_8395/clip_image002_thumb.png" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We just wrapped up a great roadshow with Microsoft in 5 US cities including Philadelphia, Columbus, Houston, Phoenix and Mountain View highlighting the exciting new developments in the AppFabric platform.&lt;/p&gt;  &lt;p&gt;The event included a keynote briefing by a Microsoft Product Manager, a deep dive technical session led by our Connected Systems consultants and either a customer session or “Ask the Experts” panel to wrap things up.  &lt;/p&gt;  &lt;p&gt;The event was well received and there was lots of good discussion and questions.&lt;/p&gt;  &lt;p&gt;As promised, I am posting the deck as well as a link to a recorded version of the presentation for those who attended and would like to reference the material or those who were unable to attend. &lt;/p&gt;  &lt;p&gt;Abstract: &lt;strong&gt;&lt;em&gt;Building Composite Application Services with AppFabric and BizTalk Server 2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;BizTalk Server 2010 and AppFabric provide a comprehensive middleware platform for developing, deploying, and managing composite enterprise capabilities both on-premise and in the cloud. Come learn how AppFabric and BizTalk Server can benefit your approach to building and supporting application services at enterprise scale while transcending traditional trust boundaries and enabling the hybrid enterprise.&lt;/p&gt;  &lt;p&gt;Special thanks to the Neudesic team, including Justin Yanta, Monish Nagisetty, Brendon Birdoes and Stuart Celearier for doing such a great job on the deep dive sessions!&lt;/p&gt;  &lt;br /&gt;&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 229px; padding-right: 0px; height: 66px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-df930ee6f91132fd.office.live.com/embedrowdetail.aspx/Public/Talks/Microsoft%20Business%20Integration%20Roadshow/Building%20Composite%20Enterprise%20Hybrid%20Services%20with%20BizTalk%202010%20and%20AppFabric.pdf" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 229px; padding-right: 0px; height: 66px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-df930ee6f91132fd.office.live.com/embedrowdetail.aspx/Public/Talks/Microsoft%20Business%20Integration%20Roadshow/livemeeting[1].wmv" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;      &lt;p&gt;&lt;font size="1"&gt;Note: Session starts at 2:30 mark.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/305.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/05/02/microsoft-business-integration-roadshowndashthe-goods.aspx</guid>
            <pubDate>Mon, 02 May 2011 18:03:56 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/05/02/microsoft-business-integration-roadshowndashthe-goods.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/305.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/305.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk &amp;amp; AppFabric Interview on Computer Outlook Radio Show</title>
            <link>http://rickgaribay.net/archive/2011/02/26/biztalk-amp-appfabric-on-computer-outlook-radio-show.aspx</link>
            <description>&lt;p&gt;I was recently interviewed on The &lt;a href="http://www.computeroutlook.com/index.php" target="_blank"&gt;Computer Outlook Radio Show&lt;/a&gt; with John Iasiuolo, David Lynn, Neudesic colleague John Vogely  and Woody Pewitt and had a lot of fun talking briefly about BizTalk and AppFabric.&lt;/p&gt;  &lt;p&gt;Thanks to John Iasiuolo show host and David Lynn of Microsoft for bringing me on the show. I had a lot of fun and look forward to doing a more in depth show in the next few weeks.&lt;/p&gt;  &lt;p&gt;Here’s the link to the show for anyone interested: &lt;a title="http://www.computeroutlook.com/_computeroutlookrts/z_station-CO.php?date=021611" href="http://www.computeroutlook.com/_computeroutlookrts/z_station-CO.php?date=021611"&gt;http://www.computeroutlook.com/_computeroutlookrts/z_station-CO.php?date=021611&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Please see here for a list of archives:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.computeroutlook.com/dailyshows.php" href="http://www.computeroutlook.com/dailyshows.php"&gt;http://www.computeroutlook.com/dailyshows.php&lt;/a&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/302.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/02/26/biztalk-amp-appfabric-on-computer-outlook-radio-show.aspx</guid>
            <pubDate>Sat, 26 Feb 2011 18:52:48 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/02/26/biztalk-amp-appfabric-on-computer-outlook-radio-show.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/302.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/302.aspx</trackback:ping>
        </item>
        <item>
            <title>Building Composite Hybrid App Services with AppFabric</title>
            <link>http://rickgaribay.net/archive/2011/02/21/building-composite-app-services-with-appfabric.aspx</link>
            <description>&lt;table&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="" src="http://image.exct.net/lib/fefe1372756206/m/1/AppFab_01.png" width="692" height="229" /&gt;          &lt;br /&gt;Here are the links to my most recent talks on AppFabric including Service Bus (1/12) and bringing it all together with Server AppFabric (2/9).  &lt;br /&gt;           &lt;br /&gt;&lt;a href="http://www.neudesic.com/insight/Presentation/Pages/PW20110209.aspx" target="_blank"&gt;Building Composite Hybrid Application Services with AppFabric&lt;/a&gt;          &lt;br /&gt;          &lt;br /&gt;&lt;a href="http://www.neudesic.com/insight/Presentation/Pages/PW20110112.aspx" target="_blank"&gt;AppFabric Service Bus&lt;/a&gt;          &lt;br /&gt;          &lt;br /&gt;In the final webcast in my series on AppFabric, I discuss how Windows Server AppFabric extends the core capabilities of IIS and WAS by providing a streamlined on-premise hosting experience for WCF 4 and WF 4 Workflow Services, including elastic scale via distributed caching as well as how Windows AppFabric can benefit your approach to building and supporting composite application services via enhanced lifetime management, tracking and persistence of long-running work flow services all while providing a simple, IT Pro-friendly user interface.           &lt;br /&gt;          &lt;br /&gt;The webcast includes a number of demos including the management of WF 4 Workflow Services on-prem with Server AppFabric as well as composing calls between a WCF service hosted in an Azure Web Role with an on-premise service via AppFabric Service Bus to deliver hybrid platform as a service capabilities today.           &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt; &lt;!-- End Save for Web Slices --&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://rickgaribay.net/aggbug/301.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/02/21/building-composite-app-services-with-appfabric.aspx</guid>
            <pubDate>Mon, 21 Feb 2011 20:55:36 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/02/21/building-composite-app-services-with-appfabric.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/301.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/301.aspx</trackback:ping>
        </item>
        <item>
            <title>Richard Seroter's Architecture Musings</title>
            <link>http://rickgaribay.net/archive/2011/02/01/richard-seroters-architecture-musings.aspx</link>
            <description>&lt;p&gt;I am honored to have been invited by Richard Seroter to participate in his 27th interview in his series on Connected Systems technology for February 2011.&lt;a href="http://http://seroter.wordpress.com/" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/cfa0742d639f_A84D/image_3.png" width="240" height="65" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Richard is an absolute thought leader in the CSD space and epitomizes much of what we discussed in his day-to-day role as a Solution Architect for his very lucky employer. His blog posts, articles, speaking engagements and books cover the full breadth of the Microsoft middleware stack and his command of the technology and breadth is truly an achievement to aspire to.&lt;/p&gt;  &lt;p&gt;As we discuss, there really has never been a better time for the Microsoft platform, and I believe that AppFabric really is a unification of on-premise workloads while providing first-class tooling for cloud and hybrid.&lt;/p&gt;  &lt;p&gt;You can read the full interview here: &lt;a title="http://seroter.wordpress.com/2011/01/31/interview-series-four-questions-with-rick-garibay/" href="http://seroter.wordpress.com/2011/01/31/interview-series-four-questions-with-rick-garibay/"&gt;http://seroter.wordpress.com/2011/01/31/interview-series-four-questions-with-rick-garibay/&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I’d love your thoughts and comments and would also encourage you to read the other interviews in the series: &lt;a title="http://seroter.wordpress.com/category/four-questions/" href="http://seroter.wordpress.com/category/four-questions/"&gt;http://seroter.wordpress.com/category/four-questions/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/300.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/02/01/richard-seroters-architecture-musings.aspx</guid>
            <pubDate>Tue, 01 Feb 2011 19:42:16 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/02/01/richard-seroters-architecture-musings.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/300.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/300.aspx</trackback:ping>
        </item>
        <item>
            <title>Latest Talk on AppFabric Service Bus</title>
            <link>http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx</link>
            <description>&lt;p&gt;AppFabric provides a comprehensive middleware platform for developin&lt;a href="http://msdn.microsoft.com/appfabric" target="_blank"&gt;&lt;img style="margin: 5px; display: inline; float: right" title="Windows_Server_AppFabric" alt="Windows_Server_AppFabric" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/fc4ae4a554ee_102FE/Windows_Server_AppFabric_3.jpg" width="240" height="53" /&gt;&lt;/a&gt;g, deploying and managing applications both on premise and in the cloud.&lt;/p&gt;  &lt;p&gt;In this 3rd installment of the 4-part AppFabric Webcast series, I talk about how pivotal the AppFabric Service Bus is to realizing the pragmatic benefits of the cloud and demonstrate one way, multicast and direct communication modes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Abstract&lt;a href="http://msdn.microsoft.com/appfabric" target="_blank"&gt;&lt;img style="display: inline; float: right" title="windows_azure_app_fabric" alt="windows_azure_app_fabric" align="right" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/fc4ae4a554ee_102FE/windows_azure_app_fabric_3.png" width="240" height="64" /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The cloud is here. No longer just an interesting future technology, it is one that developers, architects and CXOs must leverage if they want to remain competitive and fiscally responsible. How do organizations maximize their investments in current on-premise assets while taking advantage of the dramatic cost and reliability benefits that the cloud offers? More importantly, how can organizations bridge on-premise applications with new capabilities in the cloud or shatter boundaries and limitations that today greatly inhibit composing business processes across private clouds? &lt;/p&gt;  &lt;p&gt;In this session, you'll understand the problem domain that software + services forces us to reason about and how the AppFabric Service Bus can help. You'll learn how to expose your on-premise applications and services through firewalls, NAT gateways, and other problematic network boundaries while leveraging the WCF skills you already have.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Download: &lt;a href="http://www.neudesic.com/Media/Webcasts/20110112/20110112.wmv"&gt;http://www.neudesic.com/Media/Webcasts/20110112/20110112.wmv&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/299.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx</guid>
            <pubDate>Thu, 13 Jan 2011 01:37:42 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2011/01/12/neudesic-appfabric-webcast-series.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/299.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/299.aspx</trackback:ping>
        </item>
        <item>
            <title>Pat Filoteo and Fellow MVPs on AppFabric &amp;amp; More</title>
            <link>http://rickgaribay.net/archive/2010/12/11/pat-filoteo-david-pallmann-and-fellow-mvps-on-appfabric-amp.aspx</link>
            <description>&lt;p&gt;I was fortunate to participate in a one hour discussion with Microsoft architect Pat Filoteo and a few fellow MVPs including my Neudesic colleague David Pallmann on Windows Azure and AppFabric a few weeks ago when I was on campus for PDC 10.&lt;/p&gt;  &lt;p&gt;The discussion was filmed and posted by the MVP team, uncut in its entirety.&lt;/p&gt;  &lt;p&gt;In the segment below, we talk about the potential for AppFabric to transform how we think about composite applications and how important hybrid composition will be to the enterprise as it identifies the chemistry and seeks the right psychology for leveraging the cloud in a manner that leads to increased effectiveness while preserving and more importantly extending the reach of on-premise assets to the cloud and beyond.&lt;/p&gt; &lt;iframe class="youtube-player" title="YouTube video player" height="345" src="http://www.youtube.com/embed/3_j6Pyxskxo?rel=0&amp;amp;hd=1" frameborder="0" width="560" type="text/html"&gt;&lt;/iframe&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;If you are interested in watching all segments, please check out the MVP Award Blog: &lt;a title="http://blogs.msdn.com/b/mvpawardprogram/archive/2010/12/08/windows-azure-q-amp-a-discussion-with-microsoft-azure-architect.aspx" href="http://blogs.msdn.com/b/mvpawardprogram/archive/2010/12/08/windows-azure-q-amp-a-discussion-with-microsoft-azure-architect.aspx"&gt;http://blogs.msdn.com/b/mvpawardprogram/archive/2010/12/08/windows-azure-q-amp-a-discussion-with-microsoft-azure-architect.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/298.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2010/12/11/pat-filoteo-david-pallmann-and-fellow-mvps-on-appfabric-amp.aspx</guid>
            <pubDate>Sat, 11 Dec 2010 22:17:54 GMT</pubDate>
            <comments>http://rickgaribay.net/archive/2010/12/11/pat-filoteo-david-pallmann-and-fellow-mvps-on-appfabric-amp.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/298.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/298.aspx</trackback:ping>
        </item>
    </channel>
</rss>
