Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond
Join
Sign in
Search Options
Search Everything
Search BizTalk Blogs
Home
AppFabric
BizTalk Server
Windows Azure
Windows Workflow
Jobs (Hire A Guru)
More ...
Home
»
BizTalk Server
»
BizTalk Blogs
»
BizTalk Community Blogs via Syndication
»
Exploring the Service Bus Relay, Queues,Topics and Subscriptions with Visual Studio 2012 RC and Windows Azure SDK 1.7
Exploring the Service Bus Relay, Queues,Topics and Subscriptions with Visual Studio 2012 RC and Windows Azure SDK 1.7
BizTalk Blogs
This group is for blogs related to BizTalk Server. This includes Community Syndicated blogs and Stephen W. Thomas’s blog.
Get this RSS feed
Home
Blogs
Sitewide Application Navigation
Home
Blogs
Media
Forums
Wikis
Groups
Options
Share this
Monthly Archive List
Archives
June 2013
(46)
May 2013
(64)
April 2013
(70)
March 2013
(65)
February 2013
(57)
January 2013
(79)
December 2012
(63)
November 2012
(68)
October 2012
(74)
September 2012
(66)
August 2012
(63)
July 2012
(77)
June 2012
(101)
May 2012
(64)
April 2012
(64)
March 2012
(68)
February 2012
(48)
January 2012
(34)
December 2011
(61)
November 2011
(44)
October 2011
(76)
September 2011
(66)
August 2011
(46)
July 2011
(66)
June 2011
(75)
May 2011
(58)
April 2011
(46)
March 2011
(65)
February 2011
(62)
January 2011
(76)
December 2010
(67)
November 2010
(140)
October 2010
(154)
September 2010
(143)
August 2010
(120)
July 2010
(86)
June 2010
(116)
May 2010
(91)
April 2010
(120)
March 2010
(98)
February 2010
(103)
January 2010
(107)
December 2009
(64)
November 2009
(118)
October 2009
(127)
September 2009
(89)
August 2009
(74)
July 2009
(115)
June 2009
(129)
May 2009
(134)
April 2009
(136)
March 2009
(161)
February 2009
(100)
January 2009
(107)
December 2008
(107)
November 2008
(106)
October 2008
(173)
September 2008
(146)
August 2008
(139)
July 2008
(101)
June 2008
(115)
May 2008
(120)
April 2008
(134)
March 2008
(104)
February 2008
(136)
January 2008
(106)
December 2007
(73)
November 2007
(135)
October 2007
(143)
September 2007
(138)
August 2007
(144)
July 2007
(139)
June 2007
(139)
May 2007
(166)
April 2007
(199)
March 2007
(200)
February 2007
(188)
January 2007
(182)
December 2006
(151)
November 2006
(149)
October 2006
(184)
September 2006
(147)
August 2006
(124)
July 2006
(125)
June 2006
(125)
May 2006
(89)
April 2006
(63)
March 2006
(83)
February 2006
(40)
January 2006
(42)
December 2005
(16)
November 2005
(32)
October 2005
(17)
September 2005
(29)
August 2005
(15)
July 2005
(11)
June 2005
(45)
May 2005
(39)
April 2005
(28)
March 2005
(14)
February 2005
(16)
January 2005
(18)
December 2004
(14)
November 2004
(13)
October 2004
(11)
September 2004
(26)
August 2004
(8)
July 2004
(9)
June 2004
(2)
May 2004
(2)
April 2004
(2)
March 2004
(2)
February 2004
(1)
Tags
.Net
.NET Framework
Architecture
ASP.NET
Azure
BizTalk
BizTalk 2006
BizTalk 2009
BizTalk 2010
BizTalk Server
Cloud
Community News
General
Microsoft
REST
SharePoint
SOA
Tellago
Uncategorized
Visual Studio
WCF
WCF/WF
Web Services
WF
Windows Azure
BizTalk Community Blogs via Syndication
Numerous BizTalk Bloggers all in one spot. All content is property of the original blog owner.
RSS for posts
Exploring the Service Bus Relay, Queues,Topics and Subscriptions with Visual Studio 2012 RC and Windows Azure SDK 1.7
Rate This
Syndicated BizTalk Author
Sun, Jun 17 2012 10:42 AM
Comments
0
Introduction
In my post on
Future BizTalk Server Release and Microsoft Integration Strategy
I discussed the three pronged Microsoft integration strategy:
On-premise BizTalk (a CTP of next version will be released this summer)
BizTalk IaaS (
Infrastructure as a Services
), Windows Azure offers services like Virtual Machine and Virtual Network to enable to have your BizTalk infrastructure in the cloud;
BizTalk PaaS (
Platform as a Services
) with EDI/EAI integration capabilities using the Service Bus.
In this post I like to share my exploration of the
Windows Azure Service Bus
. My focus is on BizTalk professionals that do not yet have much experience/knowledge of the Windows Azure Service Bus.Two sessions by
Clemens Vasters
from last
TechEd North America
were my baseline before I started my exploration:
Overview and Roadmap of Windows Azure Service Bus
Achieving Enterprise Integration Patterns with Windows Azure Service Bus
I will explore capabilities of Queues, Topics and the Relay as depicted in overview below of the Service Bus.
In picture above you see different solutions, devices that through services bus communicate with Line of Business applications (SAP, Oracle E-Business Suite), SharePoint and many other systems and applications.
The
Windows Azure Service Bus
offers capabilities that allow you to create solutions in the cloud that are based on message-oriented-middleware technologies including reliable message queuing and durable publish/subscribe messaging. Ergo its is a messaging infrastructure in the cloud. This means that Service Bus can act as a broker for asynchronous messaging (decoupling). Therefor this infrastructure can support publish-subscribe, temporal decoupling, and load balancing scenarios similar to BizTalk Server.
Queues
,
Topics and Subscriptions
are services (entities) of the Service Bus that provide durable, asynchronous messaging.
Relay
is an entity that allows you to pass-through message (relay) from one system/application to another. Relay service that sits in Service Bus brings the ability to securely expose Windows Communication Foundation (WCF) services (even orchestrations or LoB Services) that reside within your enterprise network to the public cloud, without having to open up a firewall connection or requiring intrusive changes to your enterprise network infrastructure.
Note:
Notifications topics and bridges are services (entities) in Service Bus that will be available later and are currently not present.
Get started
To get started I created a new VM with Windows Server 2008 R2 with
Visual Studio 2012 RC
and
Windows Azure SDK 1.7
. Now the SDK can also be used with Visual Studio 2010 SP1. You can use either VS2010 or VS2012 with this SDK.
Samples
The sample on the relay is a 101 sample on using the
Relay
. The other sample is more a walkthrough, using
Queues
,
Topics
and
Subscriptions
in the service bus by using the Service Bus Explorer. There illustrative to show the capabilities of these services if you are not familiar with them. You’ll need either Visual Studio 2010 SP1 or Visual Studio 2012 RC, Windows Azure SDK 1.7 (June 2012) and a namespace in Service Bus. Relay samples in this post and the walkthrough with the Service Bus Explorer is done in Visual Studio 2012 RC.
Create a namespace
To create a service namespace:
Log on to the
Windows Azure Management Portal
. If you end up in the new portal then select preview and choose
Take me to the previous portal
(Managing the Service Bus is still done in the old portal).
In the lower left navigation pane of the Management Portal, click
Service Bus, Access Control & Caching
.
In the upper left pane of the Management Portal, click the
Service Bus
node, then click the
New
button.
In the
Create a new Service Namespace
dialog box, enter a
Namespace
, and then to make sure that it is unique, click the
Check Availability
button.
After making sure the namespace name is available, choose the country or region in which your namespace should be hosted (make sure you use the same
Country/Region
in which you are deploying your compute resources), and then click the
Create Namespace
button.
The namespace you created will then appear in the Management Portal and takes a moment to activate. Wait until the status is
Active
before continuing.
Service Bus NuGet Package
The Service Bus
NuGet
package is the easiest way to get the Service Bus API and to configure your application with all of the Service Bus dependencies. The
NuGet
Visual Studio extension makes it easy to install and update libraries and tools in Visual Studio and Visual Web Developer. The Service Bus NuGet package is the easiest way to get the Service Bus API and to configure your application with all of the Service Bus dependencies.
To install the NuGet package in your application, do the following:
In Solution Explorer, right-click
References
, then click
Manage NuGet Packages
.
Search for "WindowsAzure.ServiceBus" and select the
Windows Azure Service Bus
item. Click
Install
to complete the installation, then close this dialog.
Building a SIMPLE Relay Sample
To build a sample that will make use of relay service you need to create a WCF-service. The following steps show how to build a very basic service that can be exposed in the Service Bus.
Within Visual Studio, create a console application
Add the
Windows Azure Service Bus NuGet
package to the projects. This adds all of the necessary assembly references to your projects.
Add a class to project and give it a descriptive name.
Rename the class to
HelloRelayContract
and then implement code like below:
Add a new class to the project and rename it
HelloRelay
and then implement code like below:
In program.cs implement the following code:
In order to perform management operations, such as creating a relay connection, on the new namespace, you need to obtain the management credentials for the namespace.
Select the namespace you just created from the list show below:
The
Properties
pane on the right side will list the properties for the new namespace:
The
Default Key
is hidden. Click the
View
button to display the security credentials:
Open
app.config
and make the appropriate adjustments like below:
You can past the default key in the
issuerSecret
attribute.
Now that you have build and configured the service you can run the console application that will act as host for the service.
Copy the address in your browser and you will get result like below:
Service Bus Explorer
One of new tools available through the SDK is the Service Bus Explorer. With the SDK installed you have access to several Azure features from Server Explorer.
To access the service bus through the Server Explorer:
Right click the Windows Azure Service Bus.
Select add new connection.
Fill in the namespace, Issuer Name and Issuer Key.
Click Ok
You now have access to Service Bus
QUEUES, TOPICS AND SUBSCRIPTIONS USING THE SERVICE BUS EXPLORER
To build a sample that will make use of queues, topics and subscriptions. These services support brokered messages. With the service explorer I can manage the service bus without using the portal (see previous paragraph). You can create queues through code or through using the explorer. Using the explorer you can right click Queues and add a new Queue.
Fill in a name, change some the values if necessary, click options and click Ok. You will then see your queue in Service Explorer.
You can right click the created queue and select
Send Test a Message
. You will then see dialog pop up with the message.
You will notice in the properties of the queue that the message count is 1.
With topics you can do the same. Right click topics and select
Create New Topic…
.
Fill in a name, change some the values if necessary, click options and click Ok. You will then see your topic in Service Explorer.
Before you can send a message to the topic you need to create a subscription. Select subscriptions and right click. Select
Create New Subscription …
.
Fill in a name, change some the values if necessary, click options and click Ok. You will then see your topic in Service Explorer.
Like queues you can send a test message through the topic.You can right click the created topic and select
Send Test a Message
. You will then see dialog pop up with the message. In subscription properties you will see message count is 1.
On the subscription you can right click and select Receive Message. A dialog will pop up with the message.
Now you can create more subscriptions in the topic and then sent a test message. You will then see that both subscriptions in the topic will have that message. Now you can use rules to determine, which subscription will get which message. This is new functionality with topics and subscriptions. You can within a subscription add a rule. Open the desired subscription and right click rules. Select
Create New Rule…
. A dialog will appear.
Give it a name and add a Sql Filter Expression. Click Ok. You now have created a rule on the subscription.
Note:
The
Overview and Roadmap of Windows Azure Service Bus
session of Teched NA will provide more context on Service Bus explorer. It will also demo using queues and topics with new Worker Role with Service Bus template.
Call to action
To learn more besides the two sessions from TechEd I suggest to look at
Developing Applications that Use the Service Bus
on MSDN, Alan Smith’s
Developers Guide to AppFabric
and resources listed below:
Windows Azure Code Samples, Toolkits, and Accelerators
Windows Azure Training Kit
White Papers on Windows Azure
Update:
Thanks to
Paolo Salvatori
I have been pointed some of the articles and samples he wrote on the Service Bus:
Service Bus Explorer (Windows Azure Sample)
How to integrate a BizTalk Server application with Service Bus Queues and Topics
How to integrate a WCF Workflow Service with Service Bus Queues and Topics
I myself got a little more feeling now with the new SDK and some of its features. My experience with the Service Bus explorer within Visual Studio 2012 RC so far has been great. It works seamlessly and is straight forward. Enjoy your own exploration!
Cheers,
- Steef-Jan
Read the complete post at
feedproxy.google.com/.../exploring-service-bus-relay.html
BizTalk
,
Relay
,
Windows Azure
,
Service Bus
,
Topics and Subscriptions
,
Service Bus Explorer
,
Visual Studio 2012 RC
,
Queues