<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Zaheer Ud Din on Medium]]></title>
        <description><![CDATA[Stories by Zaheer Ud Din on Medium]]></description>
        <link>https://medium.com/@ZaheerUdDin?source=rss-fe2b1e6737e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GOYZQgPLBDullBJwssKfXw.png</url>
            <title>Stories by Zaheer Ud Din on Medium</title>
            <link>https://medium.com/@ZaheerUdDin?source=rss-fe2b1e6737e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:50:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ZaheerUdDin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part-2: Unlocking Reliable Communication Between Microservices, A Deep Dive into Fault Tolerance…]]></title>
            <link>https://medium.com/@ZaheerUdDin/part-2-unlocking-reliable-communication-between-microservices-a-deep-dive-into-fault-tolerance-27a73287410a?source=rss-fe2b1e6737e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/27a73287410a</guid>
            <dc:creator><![CDATA[Zaheer Ud Din]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 18:50:02 GMT</pubDate>
            <atom:updated>2023-06-21T16:52:30.144Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part-2: Unlocking Reliable Communication Between Microservices, A Deep Dive into Fault Tolerance, Outbox Pattern, with Cross-Cutting Implementations.</h3><blockquote>Note: This article assumes a working knowledge of microservices architecture, Spring Boot, and Aspect-Oriented Programming (AOP).</blockquote><p>In <a href="https://medium.com/@ZaheerUdDin/unlocking-reliable-communication-between-microservices-a-deep-dive-into-fault-tolerance-outbox-efd4ee0768c6">Part 1</a>, we explored fault tolerance, the outbox pattern, and their significance in ensuring reliable communication between microservices. Now, in Part 2, we will delve into the practical execution and implementation of these concepts. To keep it concise, we’ll provide a skeleton of the AOP implementation in this article.</p><p>To begin, let’s take a closer look at the <a href="https://resilience4j.readme.io/docs">resilience4J</a> configuration properties for the Circuit Breaker pattern. Each property corresponds to a specific stage of the circuit breaker, allowing us to fine-tune its behavior:</p><pre>resilience4j.circuitbreaker.instances.robustCircuit.registerHealthIndicator=true<br>resilience4j.circuitbreaker.instances.robustCircuit.slidingWindowSize=100<br>resilience4j.circuitbreaker.instances.robustCircuit.minimumNumberOfCalls=10<br>resilience4j.circuitbreaker.instances.robustCircuit.permittedNumberOfCallsInHalfOpenState=3 <br>resilience4j.circuitbreaker.instances.robustCircuit.waitDurationInOpenState=10s <br>resilience4j.circuitbreaker.instances.robustCircuit.failureRateThreshold=50 <br>resilience4j.circuitbreaker.instances.robustCircuit.eventConsumerBufferSize=10 <br>resilience4j.circuitbreaker.instances.robustCircuit.automaticTransitionFromOpenToHalfOpenEnabled=true<br><br>#Retry configs<br>resilience4j.retry.maxAttempts=3 <br>resilience4j.retry.waitDuration=2</pre><ol><li><strong><em>registerHealthIndicator</em></strong>: Enables the registration of a health indicator for the circuit breaker.</li><li><strong><em>slidingWindowSize</em></strong>: Determines the number of recent calls recorded in the sliding window for evaluating the failure rate.</li><li><strong><em>minimumNumberOfCalls</em></strong>: Sets the minimum number of calls required before the circuit breaker can calculate the failure rate.</li><li><strong><em>permittedNumberOfCallsInHalfOpenState</em></strong>: Specifies the maximum number of calls allowed in the half-open state. If this limit is exceeded, the circuit breaker will transition back to the open state.</li><li><strong><em>waitDurationInOpenState</em></strong>: Defines the duration the circuit breaker stays in the open state before transitioning to the half-open state.</li><li><strong><em>failureRateThreshold</em></strong>: Sets the threshold for the failure rate, above which the circuit breaker will open.</li><li><strong><em>eventConsumerBufferSize</em></strong>: Determines the size of the buffer used for consuming circuit breaker events.</li><li><strong><em>automaticTransitionFromOpenToHalfOpenEnabled</em></strong>: Enables automatic transition from the open to the half-open state.</li></ol><blockquote>Let’s define our supercharged annotation: <strong>@</strong>RobustCircuit<strong>()</strong></blockquote><p>One word to rule them all, harnessing the power of resiliency, tolerance, and recovery, all in the palm of single annotation! 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*78TmrPD0oCxvoy2soDReFQ.png" /></figure><p>The power Aspect-Oriented Programming (AOP) will allows us to separate the concerns of fault tolerance and message recovery from the core business logic, promoting clean and maintainable code. By applying AOP, we can inject fault tolerance behaviors transparently into our microservices without cluttering the codebase, resulting in a more resilient and reliable system.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/850725b424db8debc4fa282648f548b7/href">https://medium.com/media/850725b424db8debc4fa282648f548b7/href</a></iframe><p>In our ResilientAspect class, we define the core functionality. The @Before advice handles similar messages that might have failed to process, ensuring they are not lost. The @Around advice decorates the existing logic and adds the fallback mechanism and outbox recovery behavior.</p><p>The execute method leverages the power of resilience4j&#39;s decorators to apply the circuit breaker and fallback behavior to the method invocation. And in case of fallback, the recoverMessageIncaseOfFallback method takes care of saving the message to the outbox and registering for the transition event, allowing failed messages to be reprocessed when the circuit breaker is in the closed state.</p><p>With this resilient architecture and the use of AOP, we can confidently handle failures, recover from them, and ensure reliable communication between our microservices. Stay tuned for more details and a step-by-step guide in the next part of this article!</p><p>Stay resilient, my fellow developers! 💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27a73287410a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part-1: Unlocking Reliable Communication Between Microservices, A Deep Dive into Fault Tolerance…]]></title>
            <link>https://medium.com/@ZaheerUdDin/unlocking-reliable-communication-between-microservices-a-deep-dive-into-fault-tolerance-outbox-efd4ee0768c6?source=rss-fe2b1e6737e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/efd4ee0768c6</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Zaheer Ud Din]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 00:27:27 GMT</pubDate>
            <atom:updated>2023-06-18T19:18:41.132Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part-1: Unlocking Reliable Communication Between Microservices, A Deep Dive into Fault Tolerance, Outbox Pattern, with Cross-Cutting Implementations.</h3><p>We dive into the world of fault tolerance, exploring how it enables reliable communication between microservices. Learn about the powerful outbox pattern and its role in recovering from failures. We also explore the practical implementation of cross-cutting techniques, ensuring seamless interactions within distributed systems. Gain valuable insights to enhance the resilience of your microservices and deliver high-performance, fault-tolerant solutions.</p><p>At the end, we will have a production-ready library where all the essential functionality is encapsulated in a single, powerful annotation: @FaultTolerant() with the help of <a href="https://resilience4j.readme.io/docs">resiliant4j</a>, outbox design pattern, <a href="https://en.wikipedia.org/wiki/Aspect-oriented_programming">AOP based implementation</a>.</p><figure><img alt="Outbox as fallback pattern on bottom of circuit breaker pattern as recovery mechanism" src="https://cdn-images-1.medium.com/max/623/1*1IaAXx7Zm1FSSU3nyYNICA.jpeg" /></figure><p>This library will be highly modular, less verbose &amp; highly scalable.</p><p>In the next part of this article I will provide step by step detailed article to implement it from scratch using Sprig Boot, Resilliance4j with the help of Aspect Oriented Programming.</p><p>If you’re interested in exploring the implementation in Node tech stacks, please let me know, and I will be glad to cover those as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efd4ee0768c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>