My use case is following: I have several users, that subscribed on countries, other words, one user can be related to some countries.
So, producer sends message for country USA, it means that subscribed users on USA should recieve this message. Like a fanout type.
I was thinking about architecture of transport messages in Rabbit MQ broker.
So, I think it is ugly way to create exchanges equal number of countries.
Instead that I suppose to place one exchange with name country binded with some queues, one queue for one country.
Then on client side I determine on which queues users subscribed (Countries).
A continuation:
What if there are cities assigned to countries, and user also subscribes on cities of country?
Should I create another exchange cities
and listen messages from queue? Can I send message from country exchange to city exchange directly?
Scheme is fr one country and some relative cities:
Producer -> CountryExhange(USA) ->
CityExchange(Washington) -> Queue (Washington) ->
Consumes (USA, Washington)