<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
Hi,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
I&#39;ve been trying to use RabbitMQ and faced the following question.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
I need to intensively broadcast 10 types of messages (so there will be many consumers for each message type) and each type has ~100 subtypes.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
I wonder which of the following approaches is better:</p><ol style="margin:0px 0px 1em 30px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;list-style-position:initial;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
<li style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;word-wrap:break-word"><p style="margin:0px 0px 1em;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">
Create a direct exchange for each message type and send messages with a routing key (subtype name) and consumers will be connected �with a temporary queue. (Because there is no complex routing keys like &#39;key1.key2.*&#39; I decided not to use topic exchange).</p>
</li><li style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;word-wrap:break-word"><p style="margin:0px 0px 1em;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">
Create a fanout exchange for each message subtype (something around 1000 exchanges).</p></li></ol><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;word-wrap:break-word;color:rgb(0,0,0);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
Best regards,<br>Oleg</p></div>