{"id":1218,"date":"2018-01-16T01:10:02","date_gmt":"2018-01-16T09:10:02","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/"},"modified":"2018-01-16T01:10:02","modified_gmt":"2018-01-16T09:10:02","slug":"saga-pattern-implement-business-transactions-using-microservices-part-2","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/","title":{"rendered":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/distributed-multi-document-acid-transactions-in-couchbase\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7564\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Couchbase-transaction.png\" alt=\"\" width=\"993\" height=\"120\"><\/a><\/p>\n\n\n\n<p><span><a href=\"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part\/\">In the previous post<\/a>, we saw some of the challenges of implementing distributed transactions and how to implement Saga\u2019s pattern using the Event\/Choreography approach. In this article, let\u2019s talk about how to address some of its problems like complex transactions or cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Saga\u2019s Command\/Orchestration Sequencing Logic<\/b><\/h3>\n\n\n\n<p><span>In the orchestration approach, we define a new service with the sole responsibility of telling each participant what to do and when. The <a href=\"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part\/\">saga pattern<\/a> orchestrator communicates with each service in a command\/reply style telling them what operation should be performed.<\/span><\/p>\n\n\n\n<p><span>Let\u2019s see how it looks like using our previous e-commerce example:<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4432 aligncenter\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Screen-Shot-2018-01-11-at-7.40.54-PM-1024x627-1.png\" alt=\"Command\/Orchestration flow\" width=\"712\" height=\"436\"><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><span><em>Order Service<\/em> saves a pending order and asks Order Saga Orchestrator (OSO) to start a <em>create order transaction<\/em>.<\/span><\/li>\n\n\n<li><em>OSO<\/em> sends an <em><strong>Execute Payment<\/strong><\/em> command to <em>Payment Service<\/em>, and it replies with a <em><strong>Payment Executed<\/strong><\/em> message<\/li>\n\n\n<li><em>OSO<\/em> sends a <em><strong>Prepare Order<\/strong><\/em> command to Stock Service, and it replies with an <em><strong>Order Prepared<\/strong><\/em> message<\/li>\n\n\n<li><em>OSO<\/em> sends a <em><strong>Deliver Order<\/strong><\/em> command to Delivery Service, and it replies with an <em><strong>Order Delivered<\/strong><\/em> message<\/li>\n\n<\/ol>\n\n\n\n<p><span>In the case above, Order Saga Orchestrator knows what is the flow needed to execute a \u201ccreate order\u201d transaction. If anything fails, it is also responsible for coordinating the rollback by sending commands to each participant to undo the previous operation.<\/span><\/p>\n\n\n\n<p><span>A standard way to model a saga orchestrator is\u00a0a State Machine where each transformation corresponds to a command or message. State machines are an excellent pattern to structure a well-defined behavior as they are easy to implement and particularly great for testing.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Rolling Back in Saga\u2019s Command\/Orchestration<\/b><\/h3>\n\n\n\n<p><span>Rollbacks are a lot easier when you have an orchestrator to coordinate everything:<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4433\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Screen-Shot-2018-01-11-at-7.41.06-PM-1024x652-1.png\" alt=\"\" width=\"664\" height=\"423\"><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><i><span>Stock Service<\/span><\/i><span> replies to OSO with an <\/span><b><i>Out-Of-Stock<\/i><\/b><span> message;<\/span><\/li>\n\n\n<li><span>OSO recognizes that the transaction has failed and starts the rollback<\/span>\n<ol>\n<li><span>In this case, only a single operation was executed successfully before the failure, so <\/span><i><span>OSO<\/span><\/i><span> sends a <\/span><b><i>Refund Client<\/i><\/b><span> command to <\/span><i><span>Payment Service<\/span><\/i><span> and set the order state as failed<\/span><\/li>\n<\/ol>\n<\/li>\n\n<\/ol>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Benefits and Drawbacks of Using Saga\u2019s <\/b><b>Command\/Orchestration Design<\/b><\/h3>\n\n\n\n<p><span>Orchestration-based sagas have a variety of benefits: \u00a0<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span>Avoid cyclic dependencies between services, as the <\/span><span>saga orchestrator invokes the saga participants but the participants do not invoke the orchestrator<\/span><\/li>\n\n\n<li><span>Centralize the orchestration of the distributed transaction<\/span><\/li>\n\n\n<li><span>Reduce participants&#8217; complexity as they only need to execute\/reply commands.<\/span><\/li>\n\n\n<li><span>Easier to be implemented and tested<\/span><\/li>\n\n\n<li><span>The transaction complexity remains linear when new steps are added<\/span><\/li>\n\n\n<li>Rollbacks are easier to manage<\/li>\n\n\n<li>If you have a second transaction willing to change the same target object, you can easily put it on hold on the orchestrator until the first transaction ends.<\/li>\n\n<\/ul>\n\n\n\n<p><span>However, this approach still has some drawbacks, one of them is the risk of concentrating too much logic in the orchestrator and ending up with an architecture where the smart orchestrator tells dumb services what to do.<\/span><\/p>\n\n\n\n<p><span>Another downside of Saga\u2019s Orchestration-based is that it slightly increases your infrastructure complexity as you will need to manage an extra service.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Saga Pattern Tips<\/b><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><b>Create a Unique Id per Transaction<\/b><\/h4>\n\n\n\n<p><span>Having a unique identifier for each transaction is a common technique for traceability, but it also helps participants to have a standard way to request data from each other. By using a transaction Id, for instance, Delivery Service could ask Stock Service where to pick up the products and double check with the Payment Service if the order was paid.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><b>Add the Reply Address Within the Command<\/b><\/h4>\n\n\n\n<p><span>Instead of designing your participants to reply to a fixed address, consider sending the reply address within the message, this way you enable your participants to reply to multiple orchestrators.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><b>Idempotent Operations<\/b><\/h4>\n\n\n\n<p><span>If you are using queues for communication between services (like SQS, Kafka, RabbitMQ, etc.), I personally recommended you make your operations Idempotent. Most of those queues might deliver the same message twice.<\/span><\/p>\n\n\n\n<p><span>It also might increase the fault tolerance of your service. Quite often a bug in a client might trigger\/replay unwanted messages and mess up with your database.<\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><b>Avoiding Synchronous Communications<\/b><\/h4>\n\n\n\n<p><span>As the transaction goes, don\u2019t forget to add into the message all the data needed for each operation to be executed. The whole goal is to avoid synchronous calls between the services just to request more data. It will enable your services to execute their local transactions even when other services are offline.<\/span><\/p>\n\n\n\n<p><span>The downside is that your orchestrator will be slightly more complex as you will need to manipulate the requests\/responses of each step, so be aware of the tradeoffs.<\/span><\/p>\n\n\n\n<p><span>If you have any questions, feel free to ask me at <a href=\"https:\/\/twitter.com\/deniswsrosa\">@deniswsrosa<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous post, we saw some of the challenges of implementing distributed transactions and how to implement Saga\u2019s pattern using the Event\/Choreography approach. In this article, let\u2019s talk about how to address some of its problems like complex transactions or cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or [&hellip;]<\/p>\n","protected":false},"author":8754,"featured_media":1217,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[127],"tags":[],"ppma_author":[287],"class_list":["post-1218","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II\" \/>\n<meta property=\"og:description\" content=\"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-16T09:10:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"728\" \/>\n\t<meta property=\"og:image:height\" content=\"210\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@deniswsrosa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/\"},\"author\":{\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\"},\"headline\":\"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II\",\"datePublished\":\"2018-01-16T09:10:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/\"},\"wordCount\":785,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/saga2.png\",\"articleSection\":[\"Application Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/\",\"name\":\"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/saga2.png\",\"datePublished\":\"2018-01-16T09:10:02+00:00\",\"description\":\"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/saga2.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/saga2.png\",\"width\":728,\"height\":210},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/saga-pattern-implement-business-transactions-using-microservices-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\",\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"caption\":\"Denis Rosa, Developer Advocate, Couchbase\"},\"description\":\"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/deniswsrosa\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/denis-rosa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II - The Couchbase Blog","description":"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II","og_description":"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.","og_url":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-01-16T09:10:02+00:00","og_image":[{"width":728,"height":210,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png","type":"image\/png"}],"author":"Denis Rosa, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@deniswsrosa","twitter_misc":{"Written by":"Denis Rosa, Developer Advocate, Couchbase","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/"},"author":{"name":"Denis Rosa, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257"},"headline":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II","datePublished":"2018-01-16T09:10:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/"},"wordCount":785,"commentCount":4,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png","articleSection":["Application Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/","url":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/","name":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png","datePublished":"2018-01-16T09:10:02+00:00","description":"Learn how to address some of problems like cyclic dependencies of events by using another type of Saga\u2019s implementation called Command or Orchestration.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/saga2.png","width":728,"height":210},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/saga-pattern-implement-business-transactions-using-microservices-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Saga Pattern | How to Implement Business Transactions Using Microservices \u2013 Part II"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257","name":"Denis Rosa, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6","url":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","caption":"Denis Rosa, Developer Advocate, Couchbase"},"description":"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.","sameAs":["https:\/\/x.com\/deniswsrosa"],"url":"https:\/\/www.couchbase.com\/blog\/author\/denis-rosa\/"}]}},"acf":[],"authors":[{"term_id":287,"user_id":8754,"is_guest":0,"slug":"denis-rosa","display_name":"Denis Rosa, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/8754"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/1217"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1218"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}