For the sake of simplicity, assume I have a chat like system - it's 1 to 1 communication (can be between 1 sender and 1 receiver). Senders and receivers. I want to use an MQ flavour (probably beanstalk) to send messages from one user to another. The messages are very small, but given the number of users of twitter, there are many of them and possibly messages are produced often. I'm using this in C#.
How many channels/queues to create?
My first thought was to use 1 channel per communication (b/w 2 users), but that means millions of channels open-lots of opening and closing of channels. Perhaps there is a way to re use idle channels instead of closing them. Would that be a better thing to do?
Is there a better way to do this communication?
Thanks :)
EDIT:
Since I got no replies, I decided to post my untested design here and maybe we can use it as starter:
Each receiver client has a unique ID thus they can each open a tube with their ID name. The sender, whenever it has something to send to a client, it opens a tube/queue with destination ID as the tube's name. Sends the message. Then discards the tube.
While theoretically this seems to work, this whole closing and re-opening is bothersome.