[rabbitmq-discuss] Architectuaral Problem - What exchange type to choose?
Jan Wedel
jan.wedel at googlemail.com
Mon Oct 28 20:54:59 GMT 2013
Hi Simon,
thanks for your reply!
Ok, so when I get this correctly, I would create an exchange for each device as follows:
- key “<group>.<self>” -> queue “<group>.<self>.from"
- key “<group>.<direct_other>” -> queue “<group>.<direct_other>.to”
- key “<group>” -> queue “<group>.<other1>.to"
- key “<group>” -> queue “<group>.<other2>.to”
(…)
- key “<group>” -> queue “<group>.<otherN>.to”
Is that about what you suggested?
That’s a whole lot of bindings… depending on the number of devices. Would that be a (performance-)problem, lets say we have 1000 devices each having an exchange with >1000 bindings?
Plus, it is possible, that new devices will be added dynamically. Is there a problem, adding new devices und thus its exchanges, queues and bindings to other devices on-the-fly?
Regards,
//Jan
On 28 Oct 2013, at 10:43, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 27/10/2013 11:30AM, Jan Wedel wrote:
>> - When D3 wants to broadcast a message, it creates a producer for
>> “G1.*.to”
>>
>> Now, the first parts ok, the problem may arise when direct message
>> sending and broadcasting is involved. Intuitivly, I would be looking
>> for an exchange to would support dynamic routing, so that I could use
>> the routing keys with wildcards for a message “G1.*.to” which would
>> route the message to all “to” queues from all devices in group G1.
>> But the bindings and work the other way a round. You must have fixed
>> routing keys for a message and wildcards in bindings.
>
> So why don't you get all devices in group G1 to bind with routing key "G1.to" in addition to routing key "G1.<devicename>.to"? Then you just publish with routing key "G1.to" to send to all of G1.
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list