<div>I&#39;m starting to write a prototype with RabbitMQ but I&#39;ve some problem to understand the concept of &quot;routing key&quot;, below there&#39;s an excerpt of the producer:</div><div><br></div><div>�� �String exchangeName = &quot;myExchange&quot;;</div>
<div>�� �channel.exchangeDeclare(exchangeName, &quot;direct&quot;);</div><div>�� �String queueName = &quot;myQueue&quot;;</div><div>�� �channel.queueDeclare(queueName);</div><div>�� �String routingKey = &quot;testRoute&quot;;</div>
<div>�� �channel.queueBind(queueName, exchangeName, routingKey);</div><div><br></div><div>the consumer&#39;s code is the the same except it defines a routingKey = &quot;xyz&quot;</div><div><br></div><div>Why does the consumer gets the messages even if the routing key that it defines is different from the one defined by the producer?</div>
<div><br></div><div>Is there a document that describes the routing algorithm based on the routing key?</div><div><br></div><div>Thanks and regards,</div><div>Alex</div>