3 ms·
Pika is a little more relaxed about the exchange types: any queues subscribed to an exchange with the same routing key will be treated as if they are attached t
by old_sound 13y ago
Pika is a little more relaxed about the exchange types: any queues subscribed to an exchange with the same routing key will be treated as if they are attached to a fanout exchange, and will all receive copies of each message sent to the exchange with that routing key.
Actually that's how RabbitMQ works. The direct exchange will send messages to every queue bound to it if the routing key matches. As in: "SELECT q FROM queues where q.binding_key = msg.routing_key"
The fanout exchange will do the same but without the WHERE clause.
The topic exchange will do as the direct exchange but let's say that instead of an equals comparison it will do a match to accommodate routing key patterns for topics.
Of course RabbitMQ doesn't use SQL, this is just for illustrative purposes.