I am trying to understand what happens when we send a message to a queue
with a little more perspective.

Supose I have an exchange called *my-ex  *that has a queue called *my_q*
and this queue is bound to the exchange with the binding key *my_bid*.
Now when I send a message to the queue directrly like this

>>  ./spout my_q/someSubject This is a bind test

The message is received when I do this

>> ./drain my_q

Now I have two questions regarding this:

1- since the address being used is my_q and there is no exchange mentioned
(or the exchnage is blank) in the address does the broker first check the
default exchange and then look consecutively into  other exchanges until it
finds the specified queue ?

2-From my understanding so far is that when a message is sent to an
exchange instead of a queue then depending on the type of exchange the
message is routed to a specific queue based on the routing id and binding
id of the queue , however if the message is sent to the  a queue directly
(instead of an exchnage name) then routing id and binding id do not matter
and the message will be delivered to the queue. Is my understanding correct
?

Reply via email to