ConventionalRoutingTopology |
Implements the RabbitMQ routing topology as described at http://codebetter.com/drusellers/2011/05/08/brain-dump-conventional-routing-in-rabbitmq/ take 4: - we generate an exchange for each queue so that we can do direct sends to the queue. it is bound as a fanout exchange
- for each message published we generate series of exchanges that go from concrete class to each of its subclass / interfaces these are linked together from most specific to least specific. This way if you subscribe to the base interface you get all the messages. or you can be more selective. all exchanges in this situation are bound as fanouts.
- the subscriber declares his own queue and his queue exchange – he then also declares/binds his exchange to each of the message type exchanges desired
- the publisher discovers all of the exchanges needed for a given message, binds them all up and then pushes the message into the most specific queue letting RabbitMQ do the fanout for him. (One publish, multiple receivers!)
- we generate an exchange for each queue so that we can do direct sends to the queue. it is bound as a fanout exchange
|