I am trying to put together a message queue which allows clients to communicate to each other individually and send messages directly. Basically like tweeting on twitter (everyone can read it) while also being able to being able to send someone a direct (private) message. For example.
I am using RabbitMQ, and python and the pika3 library for this.
I can do each separately fine, using a "fanout" exchange for the first and a "direct" exchange for the second. I thought I'd be able to use a "topic" exchange to do both simultaneously. I'd bind one queue to "public.*" and the other to "private.{clientId}".
However, this does not seem to work, and I'm not really quite sure why. I've been looking around but I haven't seen anyone with a similar problem, which makes me think I'm doing things the completely wrong way around.
Another way of doing it would be to have two exchanges, a "fanout" exchange for publish/subscribe messages and a "direct" exchange for RPC messages. Listening on two exchanges seems less efficient to listening on one though.
Long story short...
How do I should up my queues and exchanges in RabbitMQ to get a publish/subscribe and RPC message queue working simultaneously?