I'm trying to use RabbitMQ for two-way one-to-one communication between clients and servers. So, Client 1 should be able to communicate only with Server 1, and vice versa:
The servers stay always connected to RabbitMQ, whereas the clients are started up and shut down on demand. This is because a server should receive all the messages from its client, but if a server sends a message to its client when the client is not present, it's ok if the message is just lost.
Furthermore, there must be a client-server pair for each user of the system.
My first idea to implement this was to create a new RabbitMQ user and vhost for each client-server pair, and two queues in each vhost (one consumed by the server and one consumed by the client).
However, is this scalable? For example, if there are 10k users of the system, there would be 10k RabbitMQ users, 10k vhosts, and 10k permanent queues, connections, channels, and consumers (from the servers).
Can these large numbers of queues and connections be a performance problem for RabbitMQ?
And what would be the best way to implement this behaviour with RabbitMQ? Or is a different technology than AMQP and RabbitMQ better suited for this use case?