[rabbitmq-discuss] Message delivered even if routing key doen't match

alexyz78 alexyz78 at gmail.com
Mon May 10 20:17:32 BST 2010

I'm starting to write a prototype with RabbitMQ but I've some problem to
understand the concept of "routing key", below there's an excerpt of the

    String exchangeName = "myExchange";
    channel.exchangeDeclare(exchangeName, "direct");
    String queueName = "myQueue";
    String routingKey = "testRoute";
    channel.queueBind(queueName, exchangeName, routingKey);

the consumer's code is the the same except it defines a routingKey = "xyz"

Why does the consumer gets the messages even if the routing key that it
defines is different from the one defined by the producer?

Is there a document that describes the routing algorithm based on the
routing key?

Thanks and regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100510/0b8c12fd/attachment.htm 

More information about the rabbitmq-discuss mailing list