Hi,

In my producer and consumer code Exchange Name and RouteKey name are same.
In the producer i am setting the message property "replyTo" with the message
queue name.
As i think it after this message should be put in the message queue whose
name is specified in the "reply To" property, but this message is available
in all the queue whose name is being used in past.
My question is: does setting the reply to property bind the message with a
queue? If this is the case then why messages are available in multiple
queues, and if this is not the case then how can restrict the messages to be
put in only one queue?

Thanks
--
View this message in context: http://old.nabble.com/Message-is-available-in-multiple-queue-tp31764872p31764872.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

  • Alvaro Videla at Jun 3, 2011 at 12:35 pm
    Setting the reply_to of a message does not put the message on a queue whose name is the value of that message property.

    Messages are routed based on exchanges and bindings. So you publish a message to an exchange using certain routing key. If there's a queue bound to that exchange whose binding matches the routing key you used to publish the message then the message will be delivered to said queue.

    The reply_to property is usually used for RPC scenarios. You publish messages adding a reply_to value to them. Then the consumer on the other end inspects that reply_to value and publishes a reply message to the anonymous exchange (or unnamed exchange) using that reply_to property as routing key. Since every queue is bound to that anonymous exchange using its name as binding key, the message will arrive to said queue.

    See: http://eaipatterns.com/ReturnAddress.html and http://www.rabbitmq.com/tutorials/tutorial-six-python.html for some sample implementation.

    Regards,

    -Alvaro
    On Jun 3, 2011, at 2:26 PM, cheepu wrote:


    Hi,

    In my producer and consumer code Exchange Name and RouteKey name are same.
    In the producer i am setting the message property "replyTo" with the message
    queue name.
    As i think it after this message should be put in the message queue whose
    name is specified in the "reply To" property, but this message is available
    in all the queue whose name is being used in past.
    My question is: does setting the reply to property bind the message with a
    queue? If this is the case then why messages are available in multiple
    queues, and if this is not the case then how can restrict the messages to be
    put in only one queue?

    Thanks
    --
    View this message in context: http://old.nabble.com/Message-is-available-in-multiple-queue-tp31764872p31764872.html
    Sent from the RabbitMQ mailing list archive at Nabble.com.

    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
    Sent form my Nokia 1100
  • Cheepu at Jun 3, 2011 at 12:57 pm
    This means if i want to put the message in one dedicated queue then i will
    have to keep the Exchange name and routekey name combination unique?





    cheepu wrote:
    Hi,

    In my producer and consumer code Exchange Name and RouteKey name are same.
    In the producer i am setting the message property "replyTo" with the
    message queue name.
    As i think it after this message should be put in the message queue whose
    name is specified in the "reply To" property, but this message is
    available in all the queue whose name is being used in past.
    My question is: does setting the reply to property bind the message with a
    queue? If this is the case then why messages are available in multiple
    queues, and if this is not the case then how can restrict the messages to
    be put in only one queue?

    Thanks
    --
    View this message in context: http://old.nabble.com/Message-is-available-in-multiple-queue-tp31764872p31765174.html
    Sent from the RabbitMQ mailing list archive at Nabble.com.
  • Michael Klishin at Jun 3, 2011 at 3:57 pm
    Cheepu,

    No. You can use a shared exchange and unique queue names (a very common scenario) or separate exchanges (many applications
    usually can get by with just one).

    Tutorials 1, 2 and 6 [1] provide some examples.

    1. http://www.rabbitmq.com/getstarted.html
    --
    MK

    cheepu escribi?:
    This means if i want to put the message in one dedicated queue then i will
    have to keep the Exchange name and routekey name combination unique?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJun 3, '11 at 12:26p
activeJun 3, '11 at 3:57p
posts4
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase