Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 132, comments - 144, trackbacks - 573

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Debatching Options and Performance Considerations in BizTalk 2004

Download This Article and Sample Code Here: Debatching Options and Performance Considerations in BizTalk 2004 White Paper and Sample Code

 

Related Sample: Xml Envelope Debatching

 

 

In some business scenarios you may be required to receive a batch file that must be broken up and processed as single messages by BizTalk Server 2004.  This could allow for individual record level processing, selective content based routing, or single message mapping. 

 

 

General Debatching Design Considerations

Here are some general design considerations you might want to think about when planning a debatching approach with BizTalk Server 2004. 

 

General Debatching Design Considerations

  • Header and Trailer Validation Requirements for Flat Files
  • All or Nothing Debatching
    • Should single records be allowed to fail some type of validation, mapping, or routing
  • Mapping Required
    • As a whole message
    • As single messages
  • Last Message Indicator Required
    • Is another process depending on knowing when the last message finished
  • Ordered Message Processing
  • Time of Day Processing
    • Will this affect other processes running
  • File Size (less important than in past versions of BizTalk)
  • Record Volume

 

Although this article is focused on general debatching options, I want to go into more detail on some of the design considerations above.

 

Header and Trailer Validation

Typically batch files are received in a format other than XML, such as flat file.  In this case, the file will typically have a Header and Trailer record.  These records typically contain information about the number of records in the file, date, time, etc.  In some business processes this information needs to be validated prior to processing the file.  This creates some interesting design challenges.

 

Some options for this type of validation include a pre-debatching map, validation of the file using .net, or validation inside an Orchestration.  The best option depends on message size since some batch files can be very large (I consider very large as greater than half a gigabyte as XML).

 

Last Message Indicator Required

Debatching implies breaking up a file into many different pieces.  Sometimes, the single items must still behave as a batch.  Some business processes require knowing when the last message in the batch has been processed to activate another process.  In addition, sometimes ordered processing of the debatching messages is required. 

 

Ordered Message Processing

Ordered processing of the messages can be accomplished in a few ways.  One way is to use an ordered delivery supported adapter, like MSMQt.  This would require the debatcher to write the messages in the correct order to the queue for processing.  This may also require the use of a convoy to route all the single messages to the same business process. The challenge is to allow for ordered delivery without significantly affecting performance.

 

 

BizTalk 2004 Debatching Options

BizTalk 2004 provides us with several different methods for batch file debatching.  What is the best way to split up your files?  As always, that depends on your exact business scenario. 

 

In this posting, I will look at four different debatching options, review the performance data, and explain the benefits of each type.  I also have the test Orchestrations I used available for download.  I do not provide any sample files, but you can make your own since the Orchestrations use untyped messages.  Just make your structure like: DataData.

 

The four methods I will cover are:

  • Receive Port Pipeline Debatching
  • Orchestration XPath Debatching
  • Orchestration Atomic Scope Node List Debatching
  • Orchestration Outside .Net Component Debatching

 

 

Debatching Options Performance Test Results

Here are the results of the performance tests on each type of debatching.  Tests were run on a 2.4 GHz desktop with 1.25GB RAM.  The sample file produced single records that were 3 KB each.  No mapping was done on the files and times do not include time to send the files using a Send Port.  This is just the time to run the pipeline or orchestrations.  Throughput is intended to show a general idea of the amount of data running through the process; it is not the overall system throughput.  Additional tests were run for XPath and Node List that produced larger output files of 29.9 KB and 299.0 KB. 

 

Type

XML Size (MB)

# Msg

Time (Sec)

Msg/Sec

Msg Size (KB)

Throughput (KB/sec)

Receive Port

1.6

500

8

62.5

3.0

205

Receive Port

3.6

1100

14

78.6

3.0

263

Receive Port

7.2

2200

34

64.7

3.0

217

Receive Port

18.1

5500

59

93.2

3.0

314

Receive Port

128.6

38500

603

63.8

3.0

218

XPath

1.6

500

121

4.1

3.0

14

XPath

3.6

1100

200

5.5

3.0

18

XPath

7.2

2200

667

3.3

3.0

11

XPath

18.1

5500

3077

1.8

3.0

6

Node List

1.6

500

9

55.6

3.0

182

Node List

3.6

1100

21

52.4

3.0

176

Node List

7.2

2200

30

73.3

3.0

246

Node List

18.1

5500

225

24.4

3.0

82

Node List

54.3

16500

1460

11.3

3.0

38

Node List

128.6

38500

15256

2.5

3.0

9

.Net Call

1.6

500

49

10.2

3.0

33

.Net Call

3.6

1100

220

5.0

3.0

17

.Net Call

7.2

2200

663

3.3

3.0

11

.Net Call

18.1

5500

3428

1.6

3.0

5

.Net Call

54.3

16500

27000

0.6

3.0

2

 

 

Type

XML Size (MB)

# Msg

Time (Sec)

Msg/Sec

Msg Size (KB)

Throughput (KB/sec)

XPath

12