Using StreamInsight 2.1 and IEnumerable to Process SQL Server Data

Using StreamInsight 2.1 and IEnumerable to Process SQL Server Data

The StreamInsight team recently released a major new version of their Complex Event Processing engine and I’ve finally gotten a chance to start playing around with it. StreamInsight 2.1 introduced a new programming model that elevated the importance of IEnumerable/IObservable as event sources/sinks and deprioritized the traditional adapter model. In order to truly replace the […]
Blog Post by: Richard Seroter

Sending High Volume Traffic to Azure Service Bus in a BizTalk Message Only Solution

Why is Azure Service Bus different than other destination when talking about High Volume Traffic in a BizTalk Message Only Solution, there is a hard limit of 100 concurrent connections per queue, topic or subscription. Now 100 connection sounds like a lot and should satisfy most requirements, but quickly you discover that 100 is not a large as you think.

The scenario that we are going to look at in this blog post is 5 minute status updates being sent to 600 partially connected clients via an Azure Service Bus Topic with 600 subscriptions. The status updates are being return from a SQL query in an enveloped message, so all 600 status update hit the BizTalk message box at the same time. The send port is configured for the clients retrieving the message via a REST client, so we are using the webMessageEncoding and the netMessagingTransport in a WCF-Custom adapter. We are also using transportClientEndpointBehavior for security credentials and the serviceBusMessageInspector (http://msdn.microsoft.com/en-us/library/windowsazure/hh532013.aspx) behaviour for promoting the MachineName for the Subscription to use for filtering.

Ok, lets start the polling, the 600 message hit the BizTalk message box and everything looks good, but then we start getting these warning showing up in the event log:

Now we have hit the 100 concurrent message limit with Azure Service Bus, these are just warning and the messages will be retries, not great but we can live with it. Make sure that you have the retry setting set to expect this, we are using:

The messages finally all get delivered to the destination topic and using Service Bus Explorer (http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a) we can see the messages in the correct subscriptions.

We check the event log and now are seeing these 3 different errors:

We found out that these errors were a know issue that happens when the WCF adapter is under strain, all of the messages still got delivered, but the error are a bit unnerving and we will try to understand them and post some details in a future blog post.

In the background we were also getting some errors on our TMG (Forefront Threat Management Gateway) Server about our machine Flooding the network, so it was necessary to add the IP address of our BizTalk Server to the Flood Mitigation IP Exceptions list in TMG.

Next Steps, now how do we throttle the number of outbound connection that BizTalk is attempting to make, we tried numerous different setting with the help of Microsoft. The setting below help mitigate the warnings and errors but do not completely solve them

So what we found it that the nature of the netMessagingTransport was such that the number of thread did not have much impact on the number of connects that it attempted to make, we have to assume that everything that the netMessagingTransport is doing is async, so it is not completely possible to control it.

Alternative that we looked at:

REST: with the Azure Service Bus the REST API does not have the limit of 100 concurrent connection because it does not use connections, but what we found was the overhead of getting the security token and sending the message for every message made the REST solution to slow.

Ordered Delivery: with BizTalk Send ports they can be set to do ordered delivery and in the past this has been a good solution for controlling SQL deadlock when you have large bursts of data being sent to SQL, but again this slowed down the writing of message to the Azure Service Bus topic so much that it was not able to meet the performance requirements.

Throttling Orchestration: with BizTalk you can create an orchestration that receive all inbound messages based on a correlation set and then limits the number of messages being processed at once, this approach would have limited the number of messages reaching the send port at once and thus prevented the send port from trying to create more than 100 concurrent connections, but this is a messaging only solution and the introduction of a controller pattern orchestration was not considered.

Custom LOB Adapter: with the BizTalk Adapter Pack the SDK gives you the ability to create a custom LOB adapter, now this sounds like heaps of work to solve a throttling situation, but we remembered from some projects in the past that the new SAP LOB Adapter has the ability to control the number of outbound connections, so we create a custom LOB adapter and then looked to see if the feature to control the number of outbound connection was specific to the SAP LOB adapter or part of the framework. Luck for us the ability to control the number of outbound connections was part of the framework. We found that the default value for the MaxConnectionPerSystem in the ConnectionManager was 100. We created a simple Custom LOB Adapter using the Microsoft.ServiceBus.dll and exposed the MaxConnectionsPerSystem of the frameworks ConnectionManager. We were then able to send all 600 messages using a MaxConnections of 25 without receiving any errors and within the necessary time requirements.

We hope this blog post help you understand the issue with Sending High Volume Traffic to Azure Service Bus in a BizTalk Message Only Solution, please stay tuned for our post on “Creating a WCF LOB Adapter to overcome Outbound Message Throttling”

More …

Tags: netMessagingTransport,serviceBusMessageInspector,Service Bus,Topic
Bouvet BizTalk Innovation Event 2012 | September 26 and 27, 2012 – Stavanger, Norway

Bouvet BizTalk Innovation Event 2012 | September 26 and 27, 2012 – Stavanger, Norway

After the Netherland and Italy, It’s now the time for Norway to receive BizTalk Innovation event. Together with Steef-Jan Wiggers, Nino Crudele, Saravana Kumar, Lex Hegt and of course our host Tord Glad Nordahl, I will do a presentation at the Bouvet BizTalk Innovation Event about Azure Service Bus EAI/EDI features. This will be a […]
Blog Post by: Sandro Pereira

The Future of BizTalk Research

Many have wondered if BizTalk will disappear, Microsoft has confirmed that BizTalk Server is not going anywhere! In fact, we can look forward to a new release with some exciting features. Read John Callaway’s article for this veteran’s take on the future of BizTalk.

So now that you know that BizTalk is changing in a big way, are you?

QuickLearn wants to know how you are using BizTalk Server today and how you plan on using it tomorrow! Answer a few questions to see how you stack up with other BizTalk Shops. Contribute your two cents. We will compile and share the results with the community (including the BizTalk Product Group).

(MCTS): Microsoft BizTalk Server 2010 (70-595) Certification Guide book review

(MCTS): Microsoft BizTalk Server 2010 (70-595) Certification Guide book review

If you are preparing or planning to take BizTalk Server 2010 certification: TS: Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2010 (Exam 70-595) this is a book you must have! It’s an excellent study guide that will help you prepare properly for this exam. I believe that never started a review […]
Blog Post by: Sandro Pereira

Running BizTalk Unit Tests in a TFS Automated Build

Since BizTalk 2009, BizTalk has had unit tests for Schemas, Maps and Pipelines. I have recently been trying to incorporate these unit tests into my BizTalk Demo Project (instructions can be found here: http://msdn.microsoft.com/en-us/library/dd257907)

The test were working fine on my local development machine, but when I ran them as part of my TFS BizTalk automated build and test, they failed with the following error:

The error said: System.IO.FileNotFoundException: Could not find file ‘Microsoft.BizTalk.TOM.resources’. So I searched the internet for the cause, I found several blog post that said to add a reference to the Microsoft.BizTalk.TOM.dll to my project, but that did not sound correct.

As part of running the wizard that create the test, it created a Local.testsettings, so I had a look at this file, in the host tab I found

This was the 1st clue I had to what was going wrong in the automated build, I then opened my Build Definition, in the Automated Tests settings under 2. Basic, I found that the TestSettings File was not specified, so I added the Local.testsettings file to my build definition.

I then queued another build for my BizTalk Demo Project and the unit testing now worked.

One other issue that I ran into with the BizTalk Unit Testing is that it requires files to be used as part of the testing and there is a difference in where the files are located between the local testing and the testing in the automated builds, so added the following code to my test.

Notice that the difference is on the build server you need to add another level Sources.

More …

Business Process and Integration

The corporate landscape of today includes a wide variety of heterogeneous business applications.

Each designed to solve a specific and specialised business problem. These applications are often not designed to work together seamlessly. This creates a major challenge when information needs to be extracted or combined for various purposes across the enterprise. The question then arises, “How do organisations extract relevant information and deliver it in the right format, to a destination either inside or outside of the organisation, across functional domains, at the right time?” This business challenge makes Business Integration a high priority.

The number one organisation I recommend to solve this problem is Connexion Technology I am proud to announce a partnership between myself and Connexion Technology, one that will see this organisation move to the forefront of this space, and help countless organisations.


BizTalk Mapper: Custom Extension XML property fixed with PowerShell script (BizTalk 2010)

BizTalk Mapper: Custom Extension XML property fixed with PowerShell script (BizTalk 2010)

In my last post I explained how to call an external assembly from Custom XSLT in BizTalk Server 2010 using the Custom Extension XML property of the maps. I also describe that BizTalk Server 2010/Visual Studio 2010 have an issue with this functionality: Visual Studio doesn’t persist the path of Custom Extension XML property in […]
Blog Post by: Sandro Pereira

BizTalk Community series: Introducing Howard S. Edidin

The Holiday is over and it is back to work. I opened up my laptop and start working on a story on a remarkable BizTalk pro Howard S. Edidin. He is currently working with me, Tord G. Nordahl and Andres del Rio on BizTalk Administration book due before end of this year. Howard is a very enthusiastic, driven and social person, who I enjoy collaborating with and share ideas on many divers BizTalk topics. So here is another story of a BizTalk community member I like to bring to the foreground.

Howard is married and has two grown sons, and two granddaughters. He resides in Libertyville, IL which is a far Northern Suburb of Chicago.

Howard has no formal education in IT. He majored in Architectural Design and had studied Theatrical Light Design at the Goodman School of Drama. He never completed his degree.

Howard has not always worked in IT. He spent many years doing Marketing and Engineering Sales in the commercial flooring industry. Working with computers was a hobby. Because of this he was also the IT guy for the company. Howard taught myself a little assembly programming, and took a few courses in C++:

“I was a “good” hacker. After a few years I decided it was time for a career change. My first job was the Web Development Manager for an Educational Foundation. Along the way I picked up my first Microsoft certification.”

Howard worked with ASP and VB Distributed for several years until .NET came along. He was introduced to BizTalk around the time when “Soap on a Rope” was first introduced by Microsoft. He didn’t get a chance to use it until BizTalk 2002 came about. Most of his career has been doing contract work. He has been able to utilize almost all of BizTalk’s capabilities, in many industries. Skipping all the ups and downs that happened in-between (which could take up about twenty pages); let’s jump to the present day:

“I am currently a BizTalk Architect specializing in providing guidance and training for companies implementing BizTalk. I recently established my own consulting company, The Edidin Group, Inc, with the hope that I could provide my services directly to companies. I am certified in BizTalk 2010 and Win95. If anyone needs any help with Win95, I’m available.”

What influenced Howard to specialize in BizTalk was that he could apply his Architectural Design training. He liked the ability to design and develop using visual tools. Howard is still amazed how quickly he can design and develop BizTalk Applications and see the results almost immediately. His opinion on BizTalk:

“Over the years I have had the opportunity to utilize BizTalk with almost every supported technology. In my opinion, it is the only product on the Microsoft Stack that relates to how all businesses function. I am a proponent of the use Business Process Modeling Notation (BPMN) for designing and documenting BizTalk solutions. I published an article on my blog and the TechNet Wiki about its use.”

And about learning to work with BizTalk:

“Over the years I have learned quite a bit about BizTalk. I have also learned to do things by the book. Sometimes, I had to rewrite sections of the book because I discovered a better way to solve a problem!”

Howard has also a view on my blog that focuses on BizTalk and Azure:

“What I like about your blog is originality. There are so many blogs that just repeat what someone else has already published. This sets your blog apart from the others. You provide original content and great tutorials. I have tried to pattern my blog after yours.”

On his own blog he states:

“Several of the articles on my blog can be considered controversial. I started the “BizTalk Bad Practices List”, which was renamed “Anti-Patterns”. I also posted it to the TechNet Wiki, with the hope that the rest of the BizTalk community would share their experiences. We added a section, External Anti-Patterns & Bad Practices, in which a contributor can link back to the source or their blog.What makes this list so valuable is that it is a list of mistakes. Hopefully, someone will benefit from one of these mistakes.”

Being a “Hacker”, Howard spends most of my spare time on the computer. Although he provides formal training sessions to clients, he has learn by doing, not from the classroom. In order to keep up with technology, he downloads samples of source code and “play with it”. Howard discovered a long time ago that BizTalk is not obfuscated. He was able to use Reflector and learned much about how BizTalk works. This has provided him with a lot of information, especially about the WCF LOB SQL Adapter. Using the source as a guideline, he has been able to start working on a Sybase Adapter. Once it is ready, he plans on sharing posting it on CodePlex.

Lately, Howard spends most of my spare time writing. He has published several articles to the TechNet Wiki and BizTalkAdminsBlogging.com, and my own blog, BizTalkIn. Finally he is also co-authoring a series of BizTalk books and is a Technical Reviewer for a SOA book.

Howard has never been the athletic type. Years ago he practiced Aikido. Nowadays he settles for walking. Being originally from north side of Chicago, he is a Cubs fan.

Howard is a very busy and passionate BizTalk professional and I would like to thank him for his time and contributions to the community.