The BAM API defines four main classes:

  • DirectEventStream: used in a .NET application to do a buffered write of data to BAM.
  • BufferedEventStream: used in a .NET application to do an unbuffered write of data to BAM.
  • OrchestrationEventStream: used when writing to BAM programmatically within an orchestration; Provides transactional consistency with the orchestration.
  • MessagingEventStream: used when writing to BAM programmatically within a pipeline; Provides transactional consistency with the messaging engine.

All of these classes are derived from the base class EventStream.

Differences between BufferedEventStream and DirectEventStream

  • BufferedEventStream:
    • Is asynchronous
    • When you update a BufferedEventStream, the update is cached and written later.
    • The BufferedEventStream take advantage of the cache to improve performance
  • DirectEventStream
    • Is synchronous
    • When you execute an update, the call won’t return until the database write is committed
    • If your application can’t ever afford to lose data in a server crash, use this class

Advantages of using OrchestrationEventStream

  • Performance: it can piggyback its databases writes on the orchestration persistence points for maximum performance
  • Consistency: because it writes during orchestration persistence points, even in the event of the server crash, the state of the orchestration recorded by BAM is guaranteed to be consistent with the last orchestration persistence point
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top