I am currently working on a PoC about Aeron MQ. As per PoC, i have 2 subscriptions and 1 publisher for a local channel with embedded media driver. The messages published are received in both the subscriptions whereas i would want to distribute the message in round-robin fashion. Is there a property or a way to achieve this?
Asked
Active
Viewed 676 times
1 Answers
3
Out the box, Aeron supports:
- One-to-one (Single Publication to a single Subscription)
- Many-to-one (Many Publications publishing to a single Subscription).
- One-to-many (Single Publication publishing to many Subscriptions using either UDP multicast or MDC over UDP unicast).
In all cases, the receiver gets all messages from point that it joins the stream. There's nothing out of the box that would give you this round-robin semantic.
In theory, you could use the primitives provided by Aeron to build a central component that would distribute the message in round-robin fashion to a set of components that request work.
Depending on your use case, you may be better off considering a solution like RabbitMQ that provides this out of the box.

James
- 388
- 3
- 7
-
is there any implementation pattern that enable us to implement something like work queue or fair dispatch competing consumer? – Welly Tambunan Aug 21 '20 at 18:43
-
1Nothing out of the box, you'd need to construct it yourself based on the primitives above. – James Aug 24 '20 at 11:28
-
Hello @James I have been working with NIO datagram channels with selector where a server has multiple channels that joins different multicast groups (and may be on different ports) and the selector will select channels that are ready to be read. Is Aeron able to support this? Are there any reference material for it? – experiment unit 1998X Feb 01 '23 at 08:57