Aeron MQ : Multiple subscription

782 Views Asked by At

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?

1

There are 1 best solutions below

3
On

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.