{"id":28435,"date":"2019-07-17T00:00:56","date_gmt":"2019-07-16T22:00:56","guid":{"rendered":"https:\/\/blexin.com\/high-availability-con-rabbitmq\/"},"modified":"2021-05-21T20:32:00","modified_gmt":"2021-05-21T18:32:00","slug":"high-availability-with-rabbitmq","status":"publish","type":"post","link":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/","title":{"rendered":"High availability with RabbitMQ"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" data-attachment-id=\"28398\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/765a3b0a-b2dd-4500-b995-2926cf4268f7-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&amp;ssl=1\" data-orig-size=\"1024,608\" 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=\"765a3b0a-b2dd-4500-b995-2926cf4268f7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?resize=1024%2C608&#038;ssl=1\" alt=\"\" class=\"wp-image-28398\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7-980x582.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7-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\">When dealing with complex systems, it is often necessary to consider mechanisms, thanks to which the services provided are always available, it means that a system must be highly reliable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the previous article (<a href=\"https:\/\/www.blexin.com\/en-US\/Article\/Blog\/Decoupling-the-communication-with-RabbitMQ-40\" target=\"_blank\" rel=\"noreferrer noopener\">Decoupling the communication with RabbitMQ<\/a>), we explored the basic features of&nbsp;<em>RabbitMQ<\/em>&nbsp;and we considered how it represents an excellent solution for communication between different applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But RabbitMQ also provides features, that make it a valid tool even for those systems that require a certain level of&nbsp;<strong>QoS<\/strong>&nbsp;(Quality of Service).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A RabbitMQ broker can be defined as the logical set of one or more nodes, that run the RabbitMQ application and that share the same entities (queues, exchanges, bindings, etc.).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The set of nodes is also called&nbsp;<strong>cluster<\/strong>. These nodes are identified within the cluster by their name, consisting of a prefix and a hostname, which must be therefore unique.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, the hostname is necessary for their identification within the cluster and therefore a hostname must be resolvable, for example, through a DNS system (Domain Name System).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this reason, and to best simulate the composition of a cluster, I defined a Docker&nbsp;<strong>bridge<\/strong>&nbsp;network, that provides automatic DNS resolution between containers.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker network create --subnet=192.168.0.0\/16 cluster-network\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">We can create cluster nodes using two Docker containers, that run RabbitMQ, with the following commands:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker run -d -h node1.rabbit \\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--net cluster-network --ip 192.168.0.10\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--name rabbitNode1\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--add-host node2.rabbit:192.168.0.11\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;4369:4369&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;5672:5672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;15672:15672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;25672:25672&quot;\\ \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;35672:35672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-e &quot;RABBITMQ_USE_LONGNAME=true&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-e RABBITMQ_ERLANG_COOKIE=&quot;cookie&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rabbitmq:3-management\n\u00a0\n\u00a0\ndocker run -d -h node2.rabbit\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--net cluster-network --ip 192.168.0.11\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--name rabbitNode2\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0--add-host node1.rabbit:192.168.0.10\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;4370:4369&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;5673:5672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;15673:15672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;25673:25672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-p &quot;35673:35672&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-e &quot;RABBITMQ_USE_LONGNAME=true&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-e RABBITMQ_ERLANG_COOKIE=&quot;cookie&quot;\\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rabbitmq:3-management\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"192\" data-attachment-id=\"28400\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/1-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/1-1.png?fit=921%2C192&amp;ssl=1\" data-orig-size=\"921,192\" 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=\"1-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/1-1.png?fit=921%2C192&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/1-1.png?resize=921%2C192&#038;ssl=1\" alt=\"\" class=\"wp-image-28400\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/1-1.png 921w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/1-1-480x100.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 921px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Currently, the two nodes are separate entities:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RabbitNode1<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"451\" data-attachment-id=\"28403\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/2-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/2-2.png?fit=1882%2C828&amp;ssl=1\" data-orig-size=\"1882,828\" 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=\"2-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/2-2.png?fit=1024%2C451&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/2-2.png?resize=1024%2C451&#038;ssl=1\" alt=\"\" class=\"wp-image-28403\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/2-2-980x431.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/2-2-480x211.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\">RabbitNode2<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"451\" data-attachment-id=\"28405\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/3-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/3-2.png?fit=1882%2C828&amp;ssl=1\" data-orig-size=\"1882,828\" 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=\"3-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/3-2.png?fit=1024%2C451&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/3-2.png?resize=1024%2C451&#038;ssl=1\" alt=\"\" class=\"wp-image-28405\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/3-2-980x431.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/3-2-480x211.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\">In order to join the two nodes to the same cluster, it must be ensured that specific ports are accessible and in particular:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>4369: epdm<\/strong>&nbsp;(ERLANG PORT MAPPER DAEMON), a service for peers discovery used by nodes and Rabbitmq CLI tools;<\/li><li><strong>5672<\/strong>:&nbsp;port used by AMQP protocol;<\/li><li><strong>25672<\/strong>: used for communication between nodes and CLI tools;<\/li><li><strong>35672-35682<\/strong>: used by CLI tools for communication with nodes;<\/li><li><strong>15672<\/strong>: used, for instance, by the management UI.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, we note that, among the configured environment variables, RABBITMQ_ERLANG_COOKIE is defined. This variable is a secret key, that allows two nodes of a cluster to interact with each other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now stop the execution of RabbitMQ on the rabbitNode2 node:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker exec rabbitNode2 rabbitmqctl stop_app\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">and then:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker exec rabbitNode2 rabbitmqctl join_cluster rabbit@node1.rabbit\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"147\" data-attachment-id=\"28408\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/4-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2.png?fit=1182%2C170&amp;ssl=1\" data-orig-size=\"1182,170\" 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=\"4-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2.png?fit=1024%2C147&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2.png?resize=1024%2C147&#038;ssl=1\" alt=\"\" class=\"wp-image-28408\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2-1024x147.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2-980x141.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/4-2-480x69.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\">Restarting the application:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker exec rabbitNode2 rabbitmqctl start_app\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">We get the following result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"167\" data-attachment-id=\"28411\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/5-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2.png?fit=1182%2C193&amp;ssl=1\" data-orig-size=\"1182,193\" 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=\"5-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2.png?fit=1024%2C167&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2.png?resize=1024%2C167&#038;ssl=1\" alt=\"\" class=\"wp-image-28411\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2-1024x167.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2-980x160.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/5-2-480x78.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\">Obviously, the Management UI is very easy and practical but we can obtain information on the cluster also by running the following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker exec rabbitNode1 rabbitmqctl cluster_status\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"262\" data-attachment-id=\"28413\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/6-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/6-2.png?fit=1430%2C366&amp;ssl=1\" data-orig-size=\"1430,366\" 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=\"6-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/6-2.png?fit=1024%2C262&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/6-2.png?resize=1024%2C262&#038;ssl=1\" alt=\"\" class=\"wp-image-28413\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/6-2-980x251.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/6-2-480x123.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\">Let\u2019s try to send a message to our cluster with the&nbsp;<strong>Sender<\/strong>&nbsp;application, shown in the previous article. Once the application has been run, we can go to the management UI of both nodes, and we can see that the queue has been created and the message is correctly appended, but all that happens is replicated on both nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RabbitNode1<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"634\" data-attachment-id=\"28416\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/7-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2.png?fit=1272%2C787&amp;ssl=1\" data-orig-size=\"1272,787\" 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=\"7-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2.png?fit=1024%2C634&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2.png?resize=1024%2C634&#038;ssl=1\" alt=\"\" class=\"wp-image-28416\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2-1024x634.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2-980x606.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/7-2-480x297.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\">RabbitNode2<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"634\" data-attachment-id=\"28418\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/8-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2.png?fit=1272%2C787&amp;ssl=1\" data-orig-size=\"1272,787\" 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=\"8-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2.png?fit=1024%2C634&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2.png?resize=1024%2C634&#038;ssl=1\" alt=\"\" class=\"wp-image-28418\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2-1024x634.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2-980x606.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/8-2-480x297.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\">What happens if one of the nodes stops working?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we stop the execution on the rabbitNode1 while the message is in queue, we can find this situation on management UI of the rabbitNode2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" data-attachment-id=\"28420\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/9-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2.png?fit=1272%2C569&amp;ssl=1\" data-orig-size=\"1272,569\" 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=\"9-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2.png?fit=1024%2C458&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2.png?resize=1024%2C458&#038;ssl=1\" alt=\"\" class=\"wp-image-28420\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2-1024x458.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2-980x438.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/9-2-480x215.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\">Creating a cluster, we certainly have the replication of data and states necessary for the operating of the broker, but this is not true for queues, that are basically located on a single node and for this reason, terminating the execution of the rabbitNode1 node we have lost the message sent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To remedy this unpleasant situation that results in loss of information, RabbitMQ allows you to create&nbsp;<strong>High Available Queues<\/strong>, also called&nbsp;<strong>Mirrored Queue<\/strong>. A queue, which is located on a node (<strong>master<\/strong>), can be replicated, as well as the operations that take place on it, on the nodes (<strong>mirrors<\/strong>) that create the cluster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To configure the cluster queues to be mirrored, you need to define a&nbsp;<strong>policy<\/strong>&nbsp;that is a pattern shared by all the queues represented by a regular expression.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s run the following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\ndocker exec rabbitNode1 rabbitmqctl set_policy ha &quot;.&quot; &#039;{&quot;ha-mode&quot;:&quot;all&quot;}&#039;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">where&nbsp;<strong>ha<\/strong>&nbsp;is the name of the policy,&nbsp;<strong>\u201c.\u201d<\/strong>&nbsp;is the pattern and&nbsp;<strong>ha-mode<\/strong>, set to&nbsp;<strong>\u201call\u201d<\/strong>, causes all queues to be high available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s create the queue again by starting the Sender application, then, in the queue section of the management UI, exactly in the details of our queue, we can check what we have just described.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"576\" data-attachment-id=\"28423\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/10-3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/10-3.png?fit=901%2C576&amp;ssl=1\" data-orig-size=\"901,576\" 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=\"10-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/10-3.png?fit=901%2C576&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/10-3.png?resize=901%2C576&#038;ssl=1\" alt=\"\" class=\"wp-image-28423\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/10-3.png 901w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/10-3-480x307.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 901px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If we stop again the rabbitNode1 container, it will no longer be running but, unlike before, the queue is still available, and we have not lost the message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"637\" data-attachment-id=\"28425\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/11-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1.png?fit=1257%2C782&amp;ssl=1\" data-orig-size=\"1257,782\" 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=\"11-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1.png?fit=1024%2C637&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1.png?resize=1024%2C637&#038;ssl=1\" alt=\"\" class=\"wp-image-28425\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1-1024x637.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1-980x610.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/11-1-480x299.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\">To receive it correctly, however, you need to make a small change to our consumer application defined in the previous article as&nbsp;<strong>Receiver<\/strong>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nvar endPointList = new List&lt;amqptcpendpoint&gt;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0new AmqpTcpEndpoint(&quot;localhost&quot;, 5672),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0new AmqpTcpEndpoint(&quot;localhost&quot;, 5673)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0};\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var factory = new ConnectionFactory();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0using (var connection = factory.CreateConnection(endPointList))\n&lt;\/amqptcpendpoint&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">We define a list of Endpoints (the nodes of our cluster) by specifying the ports for the AMQP protocol. We pass this list as a parameter of the CreateConnection method, made available by the RabbitMQ client for .NET, which verifies which endpoint is available for the connection to the broker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running the&nbsp;<strong>Receiver<\/strong>&nbsp;application we notice how the message is consumed correctly:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"627\" data-attachment-id=\"28428\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/12-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1.png?fit=1182%2C724&amp;ssl=1\" data-orig-size=\"1182,724\" 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=\"12-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1.png?fit=1024%2C627&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1.png?resize=1024%2C627&#038;ssl=1\" alt=\"\" class=\"wp-image-28428\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1-1024x627.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1-980x600.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/12-1-480x294.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<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"627\" data-attachment-id=\"28430\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/13-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1.png?fit=1105%2C677&amp;ssl=1\" data-orig-size=\"1105,677\" 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=\"13-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1.png?fit=1024%2C627&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1.png?resize=1024%2C627&#038;ssl=1\" alt=\"\" class=\"wp-image-28430\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1-1024x627.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1-980x600.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/13-1-480x294.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<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"326\" height=\"250\" data-attachment-id=\"28432\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/attachment\/14-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/14.gif?fit=326%2C250&amp;ssl=1\" data-orig-size=\"326,250\" 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=\"14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/14.gif?fit=326%2C250&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/14.gif?resize=326%2C250&#038;ssl=1\" alt=\"\" class=\"wp-image-28432\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Al prossimo articolo.<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s see how to use RabbitMQ in high availability contexts<\/p>\n","protected":false},"author":196716251,"featured_media":28398,"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":[688637546,688637458,688637537],"class_list":["post-28435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-docker-en","tag-rabbitmq-en","tag-swdesign-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>High availability with RabbitMQ - Blexin<\/title>\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\/high-availability-with-rabbitmq\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"High availability with RabbitMQ - Blexin\" \/>\n<meta property=\"og:description\" content=\"Let\u2019s see how to use RabbitMQ in high availability contexts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/\" \/>\n<meta property=\"og:site_name\" content=\"Blexin\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-16T22:00:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-21T18:32:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i2.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"608\" \/>\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=\"5 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\\\/high-availability-with-rabbitmq\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/\"},\"author\":{\"name\":\"Genny Paudice\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/ae0e97a3ebb79d2f73e4411c1eb28973\"},\"headline\":\"High availability with RabbitMQ\",\"datePublished\":\"2019-07-16T22:00:56+00:00\",\"dateModified\":\"2021-05-21T18:32:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/\"},\"wordCount\":802,\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1\",\"keywords\":[\"Docker\",\"RabbitMQ\",\"softwaredesign\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/\",\"name\":\"High availability with RabbitMQ - Blexin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1\",\"datePublished\":\"2019-07-16T22:00:56+00:00\",\"dateModified\":\"2021-05-21T18:32:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/ae0e97a3ebb79d2f73e4411c1eb28973\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1\",\"width\":1024,\"height\":608},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/high-availability-with-rabbitmq\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blexin.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"High availability with RabbitMQ\"}]},{\"@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":"High availability with RabbitMQ - Blexin","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\/high-availability-with-rabbitmq\/","og_locale":"en_US","og_type":"article","og_title":"High availability with RabbitMQ - Blexin","og_description":"Let\u2019s see how to use RabbitMQ in high availability contexts","og_url":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/","og_site_name":"Blexin","article_published_time":"2019-07-16T22:00:56+00:00","article_modified_time":"2021-05-21T18:32:00+00:00","og_image":[{"width":1024,"height":608,"url":"https:\/\/i2.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","type":"image\/png"}],"author":"Genny Paudice","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Genny Paudice","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#article","isPartOf":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/"},"author":{"name":"Genny Paudice","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/ae0e97a3ebb79d2f73e4411c1eb28973"},"headline":"High availability with RabbitMQ","datePublished":"2019-07-16T22:00:56+00:00","dateModified":"2021-05-21T18:32:00+00:00","mainEntityOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/"},"wordCount":802,"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","keywords":["Docker","RabbitMQ","softwaredesign"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/","url":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/","name":"High availability with RabbitMQ - Blexin","isPartOf":{"@id":"https:\/\/blexin.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#primaryimage"},"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","datePublished":"2019-07-16T22:00:56+00:00","dateModified":"2021-05-21T18:32:00+00:00","author":{"@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/ae0e97a3ebb79d2f73e4411c1eb28973"},"breadcrumb":{"@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#primaryimage","url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","width":1024,"height":608},{"@type":"BreadcrumbList","@id":"https:\/\/blexin.com\/en\/blog-en\/high-availability-with-rabbitmq\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blexin.com\/en\/"},{"@type":"ListItem","position":2,"name":"High availability with RabbitMQ"}]},{"@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\/2020\/12\/765a3b0a-b2dd-4500-b995-2926cf4268f7.png?fit=1024%2C608&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pcyUBx-7oD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28435","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=28435"}],"version-history":[{"count":6,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28435\/revisions"}],"predecessor-version":[{"id":32934,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/28435\/revisions\/32934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media\/28398"}],"wp:attachment":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media?parent=28435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/categories?post=28435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/tags?post=28435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}