{"id":259,"date":"2018-04-18T17:08:52","date_gmt":"2018-04-18T16:08:52","guid":{"rendered":"https:\/\/www.cogin.com\/blog\/?p=259"},"modified":"2018-04-26T10:37:20","modified_gmt":"2018-04-26T09:37:20","slug":"rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2","status":"publish","type":"post","link":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/","title":{"rendered":"RabbitMQ Exchanges &#8211; RabbitMQ for MSMQ users, part 2"},"content":{"rendered":"<p>Exchanges are a new concept for MSMQ users. In RabbitMQ you can\u2019t send to a queue directly, only through an exchange. Exchange is some sort of router &#8211; it determines which messages go where. In this process messages could be multiplied, i.e. single source message could end up in multiple destination queues. This routing is configured using <strong>bindings<\/strong>.\u00a0Binding is a way to tell to exchange in more details how messages are distributed to destination queues. Since bindings can be reconfigured at a runtime, this brings us great flexibility in how messages are processed.<\/p>\n<figure id=\"attachment_281\" class=\"thumbnail wp-caption alignnone\" style=\"width: 538px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-281\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Exchanges-and-bindings.png\" alt=\"Exchanges and bindings\" width=\"528\" height=\"211\" \/><figcaption class=\"caption wp-caption-text\">Exchanges and bindings<\/figcaption><\/figure>\n<p>The simplest case is if an exchange is configured to just transfer all incoming messages to a single destination queue. That gives us more or less same functionality we had in MSMQ. However,\u00a0exchanges can handle more complex scenarios which were not natively available in MSMQ. RabbitMQ can filter messages based on some properties, and then route them to different destination queues. For example, if our message contains \u201cpayment method\u201d value, we can configure exchange to send credit card payments to one queue, and wire transfers to another one.<\/p>\n<p>Let&#8217;s see what bindings are and how they work with different kind of exchanges RabbitMQ supports.<\/p>\n<h2>Exchange bindings<\/h2>\n<p>Bindings are the way to describe to RabbitMQ how to connect exchanges and queues. Each exchange has a list of bindings (zero or more). Single binding connects exchange to a single destination &#8211; if you want to connect 3 queues, you&#8217;ll have to create 3 bindings. Apart from a queue, destination can also be another exchange. If it\u2019s another exchange, it\u2019s possible that some message will go through multiple exchanges until it reaches final queue.<\/p>\n<p>There are 4 types of exchanges in RabbitMQ, and they differ on how routing is performed, and whether it depends on message content or not. Message routing (i.e. determining destination) can depend on following factors:<\/p>\n<ul>\n<li>type of exchange<\/li>\n<li>bindings<\/li>\n<li>content of the message &#8211; its routing key or header properties<\/li>\n<\/ul>\n<p>If single message is routed to multiple destination queues, each of these queues will receive its own copy of message. So if it\u2019s routed to 3 queues, one message coming into exchange will become 3 messages going out of it, one in each of these queues.<\/p>\n<h2>Exchange types<\/h2>\n<p>There are 4 different types of exchanges: <strong>Fanout, Direct, Topic, and Headers<\/strong>. You can&#8217;t change that after exchange is created.<\/p>\n<h3>Fanout &#8211; all messages go to all destinations<\/h3>\n<figure id=\"attachment_284\" class=\"thumbnail wp-caption alignnone\" style=\"width: 304px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-284\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Fanout-exchange.png\" alt=\"RabbitMQ Fanout exchange\" width=\"294\" height=\"215\" \/><figcaption class=\"caption wp-caption-text\">RabbitMQ Fanout exchange<\/figcaption><\/figure>\n<p>This kind of exchange works the same for all messages that come in &#8211; they are all routed to all destinations specified in bindings. Content of message makes no difference. If there&#8217;s only one binding then it&#8217;s same functionality like MSMQ queue. However if there are multiple bindings, copy of message will go to each destination.<\/p>\n<h3>Direct &#8211; exact match of routing key<\/h3>\n<figure id=\"attachment_285\" class=\"thumbnail wp-caption alignnone\" style=\"width: 304px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-285\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Direct-exchange.png\" alt=\"RabbitMQ Direct exchange\" width=\"294\" height=\"215\" \/><figcaption class=\"caption wp-caption-text\">RabbitMQ Direct exchange<\/figcaption><\/figure>\n<p>Direct exchanges take into account message\u2019s <strong>routing key<\/strong> when determining where it will go. Routing key is a field in a message, which you can set to an arbitrary value when message is sent. Since routing key is under your control, you can set it to what makes sense for your application.<\/p>\n<p>What happens when a message arrives to direct exchange? Exchange will check its bindings. Each binding in this case has additional &#8220;routing key&#8221; parameter. If that parameter matches routing key from a message, that binding will be used and message will be sent to destination.\u00a0If RK is not matched, that binding will be ignored.<\/p>\n<p>Therefore direct exchanges allow you to filter messages by routing key, and to send them to different destinations based on that. For example if you put payment method into routing key , you can configure that &#8220;CreditCard&#8221; messages go to one queue, and &#8220;WireTransfer&#8221; to another.<\/p>\n<p>Let&#8217;s see how it works, using <a href=\"https:\/\/www.cogin.com\/mq\/\">QueueExplorer<\/a>. We created exchange called &#8220;Billing&#8221; and created two bindings in it, each for specific routing key:<\/p>\n<figure id=\"attachment_288\" class=\"thumbnail wp-caption alignnone\" style=\"width: 419px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-288\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/DirectExchange-bindings.png\" alt=\"Direct exchange bindings\" width=\"409\" height=\"161\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/DirectExchange-bindings.png 409w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/DirectExchange-bindings-300x118.png 300w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><figcaption class=\"caption wp-caption-text\">Direct exchange bindings<\/figcaption><\/figure>\n<p>Now we&#8217;ll drag&amp;drop two invoices from Invoices queue to Billing exchange. We can hold Ctrl so that original messages are not removed from source queue. Note that one message has &#8220;CreditCard&#8221; and another one &#8220;WireTransfer&#8221; routing key.<\/p>\n<figure id=\"attachment_292\" class=\"thumbnail wp-caption alignnone\" style=\"width: 553px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-292 size-full\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Drag-messages-to-exchange-e1524066313571.png\" alt=\"Drag messages to exchange\" width=\"543\" height=\"325\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Drag-messages-to-exchange-e1524066313571.png 543w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Drag-messages-to-exchange-e1524066313571-300x180.png 300w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><figcaption class=\"caption wp-caption-text\">Drag messages to exchange<\/figcaption><\/figure>\n<p>If we now check these two destination queues, which were set as destinations for our exchange, we&#8217;ll see that one message went to one queue and one to another, based on routing key:<\/p>\n<figure id=\"attachment_293\" class=\"thumbnail wp-caption alignnone\" style=\"width: 601px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-293 size-full\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/CreditCardPayments-e1524066377276.png\" alt=\"\" width=\"591\" height=\"380\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/CreditCardPayments-e1524066377276.png 591w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/CreditCardPayments-e1524066377276-300x193.png 300w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><figcaption class=\"caption wp-caption-text\">CreditCardPayments queue<\/figcaption><\/figure>\n<p>And here&#8217;s &#8220;WireTransferKey&#8221;, and message which ended up there because of its &#8220;WireTransfer&#8221; routing key:<\/p>\n<figure id=\"attachment_294\" class=\"thumbnail wp-caption alignnone\" style=\"width: 618px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-294 size-full\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/WireTransferPayments-e1524066399636.png\" alt=\"\" width=\"608\" height=\"378\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/WireTransferPayments-e1524066399636.png 608w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/WireTransferPayments-e1524066399636-300x187.png 300w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><figcaption class=\"caption wp-caption-text\">WireTransferPayments queue<\/figcaption><\/figure>\n<h3>Topic &#8211; pattern match of routing key<\/h3>\n<figure id=\"attachment_286\" class=\"thumbnail wp-caption alignnone\" style=\"width: 304px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-286\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Topic-exchange.png\" alt=\"RabbitMQ Topic exchange\" width=\"294\" height=\"215\" \/><figcaption class=\"caption wp-caption-text\">RabbitMQ Topic exchange<\/figcaption><\/figure>\n<p>Topic exchanges are similar to direct, but they use patterns instead of exact matching. Pattern is a\u00a0list of words separated by dots &#8211; <i>aaa.bbb.ccc<\/i>. Similar to direct exchanges, pattern is not specified on exchange level, but for each of binding separately.<\/p>\n<p>If you just specify simple pattern, it will work same as a direct exchange &#8211; exact match is required. However, pattern can contain * which replaces exactly one word, or # to replace zero or more words.<\/p>\n<p>For example, if binding pattern is <em>aaa.*<\/em>, it will match messages with routing keys <em>aaa.bbb<\/em>, <em>aaa.ccc<\/em>, but not\u00a0<em>aaa.bbb.ccc<\/em>. However, if pattern is<em> aaa.#<\/em>, it will also match <em>aaa.bbb.ccc.<\/em><\/p>\n<p>Pattern matching is essentially a way to use multiple variables in your messages, and then match one or more of them independently. For example, let&#8217;s say that sender emits log messages, and that each log entry has a value for &#8220;subsystem&#8221; (e.g. ordering\/billing\/shipping) and severity (debug\/info\/error). You can put both these values to routing key, so one message would have &#8220;ordering.debug&#8221;, and another &#8220;billing.info&#8221;.\u00a0 With patterns, you can match by subsystem, by severity, or by both values if you want to. You can redirect all &#8220;error&#8221; messages regardless of subsystem to one queue (<em>*.error<\/em>). Or all &#8220;billing&#8221; messages to another one (<em>billing.*<\/em>). Or use &#8220;shipping.info&#8221; to filter only &#8220;info&#8221; messages from &#8220;shipping&#8221; subsystem.<\/p>\n<h3>Headers &#8211; exact match of headers<\/h3>\n<figure id=\"attachment_287\" class=\"thumbnail wp-caption alignnone\" style=\"width: 379px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-287\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Headers-exchange.png\" alt=\"RabbitMQ Headers exchange\" width=\"369\" height=\"215\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Headers-exchange.png 369w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/RabbitMQ-Headers-exchange-300x175.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><figcaption class=\"caption wp-caption-text\">RabbitMQ Headers exchange<\/figcaption><\/figure>\n<p>For this kind of exchange, routing key is not consulted at all. Instead, it tries to match values in message headers. Since headers are key-value pairs, both key and value must match key-value specified in a binding.<\/p>\n<figure id=\"attachment_289\" class=\"thumbnail wp-caption alignnone\" style=\"width: 461px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-289\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Header-exchange-bindings.png\" alt=\"Header exchange bindings\" width=\"451\" height=\"423\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Header-exchange-bindings.png 451w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Header-exchange-bindings-300x281.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><figcaption class=\"caption wp-caption-text\">Editing header exchange bindings in QueueExplorer<\/figcaption><\/figure>\n<p>Since message can have multiple header values, you can choose whether they ALL should be exactly as those specified in a binding, or whether it\u2019s enough that any single of them is matched. This can be specified by adding special \u201cx-match\u201d argument to binding, with value \u201cany\u201d or \u201call\u201d. \u201call\u201d is the default value if x-match is not specified.<\/p>\n<p>&nbsp;<\/p>\n<h2>System exchanges<\/h2>\n<p>There are some exchanges that are automatically created by RabbitMQ. You can use these &#8220;system exchanges&#8221; if you don\u2019t want to create your own. There\u2019s a separate exchange for each exchange type we discussed previously. Their names start with \u201camq.\u201d, so there are amq.fanout, amq.direct, amq.topic, and amq.headers. There are few more for other purposes. They can\u2019t be deleted, but you configure their bindings.<\/p>\n<figure id=\"attachment_290\" class=\"thumbnail wp-caption alignnone\" style=\"width: 289px\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-290\" src=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/System-exchanges.png\" alt=\"System exchanges\" width=\"279\" height=\"342\" srcset=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/System-exchanges.png 279w, https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/System-exchanges-245x300.png 245w\" sizes=\"auto, (max-width: 279px) 100vw, 279px\" \/><figcaption class=\"caption wp-caption-text\">System exchanges<\/figcaption><\/figure>\n<p>There\u2019s also one special exchange without a\u00a0name, which is displayed as \u201c(AMQ default)\u201d in management tools. It\u2019s a \u201cdirect\u201d type of exchange. Specific for this exchange is that it has automatic built-in bindings for each queue. When you add a queue, it\u2019s also automatically added to a binding list, with routing key same as the name of the queue. Therefore this exchange is a shortcut for sending messages directly to any queue you want &#8211; \u00a0just send it there and set routing key to a\u00a0name of destination queue. This is closest you can get to MSMQ queue.<\/p>\n<p>In <a href=\"https:\/\/www.cogin.com\/blog\/rabbitmq\/more-about-queues-rabbitmq-for-msmq-users-part-3\/\">part 3<\/a> we&#8217;ll talk more about queues.<\/p>\n<p><a href=\"https:\/\/www.cogin.com\/articles\/Introduction-to-RabbitMQ-for-MSMQ-users.php\">Links to all 6 parts<\/a> of this series.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exchanges are a new concept for MSMQ users. In RabbitMQ you can\u2019t send to a queue directly, only through an exchange. Exchange is some sort of router &#8211; it determines which messages go where. In this process messages could be multiplied, i.e. single source message could end up in multiple destination queues. This routing is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12],"tags":[5,13],"class_list":["post-259","post","type-post","status-publish","format-standard","hentry","category-msmq","category-rabbitmq","tag-msmq","tag-rabbitmq"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2<\/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:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2\" \/>\n<meta property=\"og:description\" content=\"Exchanges are a new concept for MSMQ users. In RabbitMQ you can\u2019t send to a queue directly, only through an exchange. Exchange is some sort of router &#8211; it determines which messages go where. In this process messages could be multiplied, i.e. single source message could end up in multiple destination queues. This routing is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Cogin blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-18T16:08:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-04-26T09:37:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Exchanges-and-bindings.png\" \/>\n<meta name=\"author\" content=\"Dejan Grujic\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dejan Grujic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/\"},\"author\":{\"name\":\"Dejan Grujic\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/#\\\/schema\\\/person\\\/e0c4fd92043868daa052d5978d69ed22\"},\"headline\":\"RabbitMQ Exchanges &#8211; RabbitMQ for MSMQ users, part 2\",\"datePublished\":\"2018-04-18T16:08:52+00:00\",\"dateModified\":\"2018-04-26T09:37:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/\"},\"wordCount\":1393,\"image\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Exchanges-and-bindings.png\",\"keywords\":[\"MSMQ\",\"RabbitMQ\"],\"articleSection\":[\"MSMQ\",\"RabbitMQ\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/\",\"url\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/\",\"name\":\"RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/Exchanges-and-bindings.png\",\"datePublished\":\"2018-04-18T16:08:52+00:00\",\"dateModified\":\"2018-04-26T09:37:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/#\\\/schema\\\/person\\\/e0c4fd92043868daa052d5978d69ed22\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/rabbitmq\\\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RabbitMQ Exchanges &#8211; RabbitMQ for MSMQ users, part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/\",\"name\":\"Cogin blog\",\"description\":\"Queuing tools and articles\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/#\\\/schema\\\/person\\\/e0c4fd92043868daa052d5978d69ed22\",\"name\":\"Dejan Grujic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g\",\"caption\":\"Dejan Grujic\"},\"sameAs\":[\"http:\\\/\\\/www.cogin.com\"],\"url\":\"https:\\\/\\\/www.cogin.com\\\/blog\\\/author\\\/gruja\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/","og_locale":"en_US","og_type":"article","og_title":"RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2","og_description":"Exchanges are a new concept for MSMQ users. In RabbitMQ you can\u2019t send to a queue directly, only through an exchange. Exchange is some sort of router &#8211; it determines which messages go where. In this process messages could be multiplied, i.e. single source message could end up in multiple destination queues. This routing is [&hellip;]","og_url":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/","og_site_name":"Cogin blog","article_published_time":"2018-04-18T16:08:52+00:00","article_modified_time":"2018-04-26T09:37:20+00:00","og_image":[{"url":"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Exchanges-and-bindings.png","type":"","width":"","height":""}],"author":"Dejan Grujic","twitter_misc":{"Written by":"Dejan Grujic","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#article","isPartOf":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/"},"author":{"name":"Dejan Grujic","@id":"https:\/\/www.cogin.com\/blog\/#\/schema\/person\/e0c4fd92043868daa052d5978d69ed22"},"headline":"RabbitMQ Exchanges &#8211; RabbitMQ for MSMQ users, part 2","datePublished":"2018-04-18T16:08:52+00:00","dateModified":"2018-04-26T09:37:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/"},"wordCount":1393,"image":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Exchanges-and-bindings.png","keywords":["MSMQ","RabbitMQ"],"articleSection":["MSMQ","RabbitMQ"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/","url":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/","name":"RabbitMQ Exchanges - RabbitMQ for MSMQ users, part 2","isPartOf":{"@id":"https:\/\/www.cogin.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cogin.com\/blog\/wp-content\/uploads\/2018\/04\/Exchanges-and-bindings.png","datePublished":"2018-04-18T16:08:52+00:00","dateModified":"2018-04-26T09:37:20+00:00","author":{"@id":"https:\/\/www.cogin.com\/blog\/#\/schema\/person\/e0c4fd92043868daa052d5978d69ed22"},"breadcrumb":{"@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.cogin.com\/blog\/rabbitmq\/rabbitmq-exchanges-rabbitmq-for-msmq-users-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cogin.com\/blog\/"},{"@type":"ListItem","position":2,"name":"RabbitMQ Exchanges &#8211; RabbitMQ for MSMQ users, part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.cogin.com\/blog\/#website","url":"https:\/\/www.cogin.com\/blog\/","name":"Cogin blog","description":"Queuing tools and articles","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cogin.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cogin.com\/blog\/#\/schema\/person\/e0c4fd92043868daa052d5978d69ed22","name":"Dejan Grujic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7edfd9071a535694242755af2736da7972b73f5d026be6563586a9b0ff7829d0?s=96&d=mm&r=g","caption":"Dejan Grujic"},"sameAs":["http:\/\/www.cogin.com"],"url":"https:\/\/www.cogin.com\/blog\/author\/gruja\/"}]}},"_links":{"self":[{"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/posts\/259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":14,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"predecessor-version":[{"id":347,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/posts\/259\/revisions\/347"}],"wp:attachment":[{"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cogin.com\/blog\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}