I know that achieving round-robin behaviour in a topic exchange can be tricky or impossible so my question in fact is if there is anything I can make out of RabbitMQ or look away to other message queues that support that.
Here's a detailed explanation of my application requirements:
- There will be one producer, let's call it
P
- There (potentially) will be thousands of consumers, let's call them
Cn
- Each consumer can "subscribe" to 1 or more topic exchange and multiple consumers can be subscribed to the same topic
- Every message published into the topic should be consumed by only ONE consumer
Use case #1
Assume:
Topics
foo.bar
foo.baz
Consumers
- Consumer
C1
is subscribed to topic#
- Consumer
C2
is subscribed to topicfoo.*
- Consumer
C3
is subscribed to topic*.bar
Producer P
publishes the following messages:
- publish
foo.qux
:C1
andC2
can potentially consume this message but only one receives it - publish
foo.bar
:C1
,C2
andC3
can potentially consume this message but only one receives it
Note
Unfortunately I can't have a separate queue for each "topic" therefore using the Direct Exchange
doesn't work since the number of topic combinations can be huge (tens of thousands)
From what I've read, there is no out-of-the box solution with RabbitMQ. Does anybody know a workaround or there's another message queue solution that would support this, ex. Kafka, Kinesis etc.
Thank you