{"id":33231,"date":"2021-06-22T18:30:00","date_gmt":"2021-06-22T16:30:00","guid":{"rendered":"https:\/\/blexin.com\/?p=33231"},"modified":"2021-06-23T10:38:09","modified_gmt":"2021-06-23T08:38:09","slug":"making-systems-resilient-with-polly","status":"publish","type":"post","link":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/","title":{"rendered":"Making systems resilient with Polly"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?resize=1024%2C608&#038;ssl=1\" alt=\"\" class=\"wp-image-33197\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly-1024x608.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly-980x582.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly-480x285.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Who has never heard the term <em>resilience<\/em>? In this period of pandemic, perhaps we heard it even more often, in fact it has been associated with the restarting plans of the various countries after this dark period.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But what do we mean by resilience? With this word, science indicates the ability of a material to resist break caused by dynamic stress and, for some materials, also the ability to resume the original appearance after deformation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It would not be surprising then that this term is also used in the software field. INCOSE (International Council on Systems Engineering), which is responsible for promoting systems engineering through conferences, working groups and publications, provides this <a href=\"https:\/\/www.incose.org\/incose-member-resources\/working-groups\/analytic\/resilient-systems\" target=\"_blank\" rel=\"noreferrer noopener\">definiton<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em><em>Resilience is the ability to provide required capability in the face of (avoiding, withstanding, recovering from, and evolving and adapting to) adversity.<\/em><\/em><\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">In microservices cloud applications or, generally speaking, in distributed ones, in which there is continuous communication between services or external resources, transient errors are very frequent. These are errors due to loss of connection or temporary unavailability of a service. The nature of these types of errors involves that a subsequent request or operation can be successful.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A way to make these systems resilient and robust and therefore stable  is to use the RETRY Pattern. This pattern simply consists of repeating an operation after a failure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The strategies to be applied according to this pattern are different and depend on the type of error found:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>Cancel <\/em>&#8211; Non-transient error, it would be useless to retry the failed operation. You have to stop the operation and notify the error through an exception or maybe manage it.&nbsp;&nbsp;<\/li><li><em>Retry <\/em>&#8211; Rare or unusual error. It is very likely that by repeating the operation it will have a positive outcome.&nbsp;&nbsp;<\/li><li><em>Retry after delay <\/em>&#8211; Known error due to connection problems or service occupancy. It may be necessary to delay the repetition of the operation before trying again.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When working on one of our customers&#8217; system, in which several services communicate through messages exchanged through RabbitMQ, several times we need to make interventions on the retry strategy mechanism present on their software. This mechanism was implemented internally by the team and was not easily maintainable. Thus, we decided with the team to make a nice refactoring to the code and introduce an existing library, born to help developers with error management, and making applications resilient through different management policies. This library is called <a href=\"https:\/\/github.com\/App-vNext\/Polly\" target=\"_blank\" rel=\"noreferrer noopener\">Polly<\/a> and is officially recognized by Microsoft.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"128\" height=\"128\" data-attachment-id=\"33204\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/attachment\/image_1-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_1.png?fit=128%2C128&amp;ssl=1\" data-orig-size=\"128,128\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_1.png?fit=128%2C128&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_1.png?resize=128%2C128&#038;ssl=1\" alt=\"Polly logo\" class=\"wp-image-33204\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Polly offers several resilience policies that you can find <a href=\"https:\/\/github.com\/App-vNext\/Polly#resilience-policies%22%20HYPERLINK%20%22https:\/\/github.com\/App-vNext\/Polly#resilience-policies\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> but today we will focus on that of <em>Retry<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"736\" data-attachment-id=\"33206\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/attachment\/image_2-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_2.png?fit=834%2C736&amp;ssl=1\" data-orig-size=\"834,736\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image_2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_2.png?fit=834%2C736&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_2.png?resize=834%2C736&#038;ssl=1\" alt=\"diagram policy polly\" class=\"wp-image-33206\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/image_2.png 834w, https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/image_2-480x424.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 834px, 100vw\" \/><figcaption>Fonte:<a href=\"https:\/\/github.com\/App-vNext\/Polly\/wiki\/Retry#how-polly-retry-works\" target=\"_blank\" rel=\"noreferrer noopener\"> https:\/\/github.com\/App-vNext\/Polly\/wiki\/Retry#how-polly-retry-works<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To better show how Polly works, an example may be helpful. Let&#8217;s take the code from one of <a href=\"https:\/\/blexin.com\/en\/blog-en\/decoupling-the-communication-with-rabbitmq\/\" target=\"_blank\" rel=\"noreferrer noopener\">the first articles on RabbitMQ <\/a>we published on our blog.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In particular, let&#8217;s take the Sender code, a software that sends messages through a RabbitMQ Message Broker.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To simulate a transient error we will stop the container on which the RabbitMQ broker is running and we will restart it immediately afterwards.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s start with the base code to which I made some changes. For illustrative purposes, I created an array of strings, that is the messages we will send, filled with the FillMessages () method. I have also extracted in a method the part of code that goes to exploit the RabbitMQ driver for publishing messages. To avoid the loss of messages, in the event of a temporary stop by the broker, we will set the queue declared as <strong>durable<\/strong> and we will specify that the messages published will be of the <strong>persistent<\/strong> type.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nnamespace Sender \n{ \n        class Sender \n        { \n        public static void Main() \n        { \n        var factory = new ConnectionFactory() { HostName = &quot;localhost&quot; }; \n        using (var connection = factory.CreateConnection()) \n        using (var channel = connection.CreateModel()) \n        { \n                channel.QueueDeclare(queue: &quot;QueueDemo&quot;, \n                                     durable: true, \n                                     exclusive: false, \n                                     autoDelete: false, \n                                     arguments: null); \n  \n                var messages = new string &#x5B;100]; \n                FillMessages(messages); \n                foreach (var message in messages) \n                       { \n                        PublishMessage(message, channel); \n                       Thread.Sleep(2000); \n                       } \n        } \n\n        Console.WriteLine(&quot; Press &#x5B;enter] to exit.&quot;); \n        Console.ReadLine(); \n        } \n \n    \tprivate static void FillMessages(string&#x5B;] arrayToFill) \n    \t{ \n        for (var j = 0; j &lt; arrayToFill.Length; j++) \n        { \n                arrayToFill&#x5B;j] = $&quot;Message {j}&quot;; \n        } \n    \t} \n \n    \tprivate static void PublishMessage(string message, IModel channel) \n    \t{ \n        var body = Encoding.UTF8.GetBytes(message); \n        channel.BasicPublish(exchange: &quot;&quot;, \n                routingKey: &quot;QueueDemo&quot;, \n                basicProperties: new BasicProperties{DeliveryMode = 2}, \n            \tbody: body); \n        Console.WriteLine($&quot;Sent {message}&quot;); \n        } \n        } \n} \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">To use Polly in one of our applications, there are some steps to follow.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1) Specify the exception(s) that the policy must handle&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we launched the Sender and stopped the container on which RabbitMQ is running while sending messages, we would receive this type of exception:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Unhandled Exception: RabbitMQ.Client.Exceptions.AlreadyClosedException: Already closed: The AMQP operation was interrupted&nbsp;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We then define a policy to handle this exception using the <em>Handle()<\/em> method.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nvar retryPolicy = Policy.Handle&amp;lt; AlreadyClosedException &gt;(); \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2) Specify how the policy should handle the error<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose, therefore, that the loss of connection to the broker is a known problem or, in any case, a transient error which is manageable with a Retry strategy, as explained in the previous paragraph. There are several ways to define how you want to retry a certain operation with Polly. The simplest method is the <em>Retry() <\/em>method to which we can possibly pass an integer type parameter to indicate the number of times you want to repeat the operation. Otherwise, we can try again forever using the <em>RetryForever() <\/em>method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we said earlier, when we have a common connection error, waiting a certain period of time before trying again can be an excellent strategy. Furthermore, when there are continuous failures, we can increase the delay between attempts incrementally or exponentially to allow the service or resource to become available again. With Polly we can implement this type of Retry by means of the <em>WaitAndRetry()<\/em> method. This method provides, among the parameters, the number of attempts that you want to make, a time interval that you have to wait between one attempt and another and it is also possible to specify the logic to be performed before each attempt.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The delay between one attempt and another can be defined exponentially (exponential backoff). This definition allows you to have intervals between attempts that increase as the number of failures increases, allowing the service to have more time to get back to working properly. Using the WaitAndRetry() method provided by Polly, we can indicate a base that will be raised to a power equal to the number of attempts made at each retry.&nbsp;&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\n var retryPolicy = Policy.Handle&lt;AlreadyClosedException&gt;() \n            \t.WaitAndRetry(5, \n                retryAttempt =&gt; TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), \n              \t(exception, timeSpan, retryCount, context) =&gt; \n               \t{ \n                Console.WriteLine($&quot;This is the {retryCount} try&quot;); \n               \t} \n            \t); \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Since the exponential backoff is a fixed progression, in scenarios where the throughput is really high, it is also possible to introduce a <em>jitter<\/em> (random amount of time) to avoid load peaks and thus introduce a certain randomness in the delay calculation.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step &nbsp;3) Run the code through the policy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the policy has been established, it&#8217;s time to execute it. The Execute() method will contain the part of code that interests us, or rather, the one that can return the exception we want to handle. In our case it is the PublishMessage() method.&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nretryPolicy.Execute(() =&gt;  \n        PublishMessage(message, channel) \n);  \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s go to the simulation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_3-1.gif?w=1080&#038;ssl=1\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If we carry out the GetMessages () through the RabbitMQ UI Management, we can see that the message sent after the retry has also arrived correctly.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"864\" data-attachment-id=\"33226\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/attachment\/image_4-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_4.png?fit=890%2C864&amp;ssl=1\" data-orig-size=\"890,864\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image_4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_4.png?fit=890%2C864&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/image_4.png?resize=890%2C864&#038;ssl=1\" alt=\"\" class=\"wp-image-33226\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/image_4.png 890w, https:\/\/blexin.com\/wp-content\/uploads\/2021\/06\/image_4-480x466.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 890px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As already mentioned, this strategy is very useful in dealing with transient errors or in general when the errors you want to manage are temporary. However, it would not be effective in handling long-term errors. Furthermore, this approach should not be seen as an alternative to scalability as it does not solve the load problems. If you have a single broker system and a very high number of requests, the retry strategy can help in forwarding any failed messages to the broker but this does not mean that you can rely on a system with fewer resources and this also true if you think about performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to reactive approaches such as the Retry strategy or the <a href=\"https:\/\/github.com\/App-vNext\/Polly\/wiki\/Circuit-Breaker\" target=\"_blank\" rel=\"noreferrer noopener\">Circuit Braker<\/a>, Polly also offers <a href=\"https:\/\/github.com\/App-vNext\/Polly\/wiki\/Transient-fault-handling-and-proactive-resilience-engineering#promoting-resilience-through-a-proactive-stability-oriented-approach\" target=\"_blank\" rel=\"noreferrer noopener\">proactive strategies oriented towards stability<\/a> or preventive resilience techniques. In addition, it is possible to use Polly together with the ASPNET Core HttpClientFactory (from version 2.1) to apply policies to HTTP calls.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I leave you the <a href=\"https:\/\/github.com\/intersect88\/IntroToRabbitMQ\/tree\/RetryStrategy\" target=\"_blank\" rel=\"noreferrer noopener\">link to the repository<\/a> where you can find the example code.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See you at the next article!<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s see how to use Polly to make our systems stable and responsive to errors <\/p>\n","protected":false},"author":196716251,"featured_media":33198,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_crdt_document":"","inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[688637524],"tags":[688637421,688637458],"class_list":["post-33231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-net-en","tag-rabbitmq-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making systems resilient with Polly - Blexin<\/title>\n<meta name=\"description\" content=\"Let&#039;s discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making systems resilient with Polly - Blexin\" \/>\n<meta property=\"og:description\" content=\"Let&#039;s discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/\" \/>\n<meta property=\"og:site_name\" content=\"Blexin\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-22T16:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-23T08:38:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i2.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1105\" \/>\n\t<meta property=\"og:image:height\" content=\"656\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Genny Paudice\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Genny Paudice\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/\"},\"author\":{\"name\":\"Genny Paudice\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/ae0e97a3ebb79d2f73e4411c1eb28973\"},\"headline\":\"Making systems resilient with Polly\",\"datePublished\":\"2021-06-22T16:30:00+00:00\",\"dateModified\":\"2021-06-23T08:38:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/\"},\"wordCount\":1282,\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1\",\"keywords\":[\".Net\",\"RabbitMQ\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/\",\"name\":\"Making systems resilient with Polly - Blexin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1\",\"datePublished\":\"2021-06-22T16:30:00+00:00\",\"dateModified\":\"2021-06-23T08:38:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/ae0e97a3ebb79d2f73e4411c1eb28973\"},\"description\":\"Let's discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1\",\"width\":1105,\"height\":656},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/making-systems-resilient-with-polly\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blexin.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making systems resilient with Polly\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/\",\"name\":\"Blexin\",\"description\":\"Con noi \u00e8 semplice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blexin.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/ae0e97a3ebb79d2f73e4411c1eb28973\",\"name\":\"Genny Paudice\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g\",\"caption\":\"Genny Paudice\"},\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/author\\\/genny-paudiceblexin-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Making systems resilient with Polly - Blexin","description":"Let's discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern","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:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/","og_locale":"en_US","og_type":"article","og_title":"Making systems resilient with Polly - Blexin","og_description":"Let's discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern","og_url":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/","og_site_name":"Blexin","article_published_time":"2021-06-22T16:30:00+00:00","article_modified_time":"2021-06-23T08:38:09+00:00","og_image":[{"width":1105,"height":656,"url":"https:\/\/i2.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","type":"image\/png"}],"author":"Genny Paudice","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Genny Paudice","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#article","isPartOf":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/"},"author":{"name":"Genny Paudice","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/ae0e97a3ebb79d2f73e4411c1eb28973"},"headline":"Making systems resilient with Polly","datePublished":"2021-06-22T16:30:00+00:00","dateModified":"2021-06-23T08:38:09+00:00","mainEntityOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/"},"wordCount":1282,"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","keywords":[".Net","RabbitMQ"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/","url":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/","name":"Making systems resilient with Polly - Blexin","isPartOf":{"@id":"https:\/\/blexin.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#primaryimage"},"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","datePublished":"2021-06-22T16:30:00+00:00","dateModified":"2021-06-23T08:38:09+00:00","author":{"@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/ae0e97a3ebb79d2f73e4411c1eb28973"},"description":"Let's discover with Genny how Polly comes through for us to make applications resilient using a Retry Pattern","breadcrumb":{"@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#primaryimage","url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","width":1105,"height":656},{"@type":"BreadcrumbList","@id":"https:\/\/blexin.com\/en\/blog-en\/making-systems-resilient-with-polly\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blexin.com\/en\/"},{"@type":"ListItem","position":2,"name":"Making systems resilient with Polly"}]},{"@type":"WebSite","@id":"https:\/\/blexin.com\/en\/#website","url":"https:\/\/blexin.com\/en\/","name":"Blexin","description":"Con noi \u00e8 semplice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blexin.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/ae0e97a3ebb79d2f73e4411c1eb28973","name":"Genny Paudice","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3093a6ee7b7f555e94e4a5d6f19cb09f3af33635007643b2076eb89329789828?s=96&d=identicon&r=g","caption":"Genny Paudice"},"url":"https:\/\/blexin.com\/en\/author\/genny-paudiceblexin-com\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2021\/06\/11_ITA_1105x656_blog-polly.png?fit=1105%2C656&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pcyUBx-8DZ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/33231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/users\/196716251"}],"replies":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/comments?post=33231"}],"version-history":[{"count":8,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/33231\/revisions"}],"predecessor-version":[{"id":33251,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/33231\/revisions\/33251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media\/33198"}],"wp:attachment":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media?parent=33231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/categories?post=33231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/tags?post=33231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}