![]() If a matching instance does not exist, a new instance is created. On message receipt, an existing saga instance is loaded from the database.While consuming a message, a saga may send commands and/or publish events. Between messages, the saga instance state is persisted using a database. An initial message creates a saga instance and subsequent messages may correlate to the same instance. In MassTransit, sagas are message handlers that maintain state. In distributed systems, performing a distributed transaction between the database and the message broker is unrealistic. In a transactional mindset, updating the database and publishing the event is expected to be performed as a single atomic operation. Updating a database record usually includes publishing events to notify services that a change in state has occurred. # CommandsĬommands are used to do things, like update a database record. Some of these patterns are obvious, but some of them require a little more explanation to truly understand how they are best utilized. MassTransit implements messaging patterns, many of which are designed to ease the transition from a tightly-coupled, database-centric application to a set of services that are highly available, reliable, and eventually consistent. ![]() ![]() This post details the In-Memory Outbox, including what it does, how to configure it, and how it ensures eventual consistency in the presence of database or message transport failures. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |