eclipse/amlen

Global-Shared subscriptions in cluster mode

Closed this issue · 3 comments

We have a clustered Amlen, v1.0.0.1-20220622

Case 1 (working as intended)

  • Consumer connects to node-0, subscribes to topic mask "testtopic/#"
  • Producer connects to node-1, sends message "Hello" to topic "testtopic/0"
  • Consumer receives the "Hello" message
    Actually consumer can connect to any node and still receive messages

Case 2 (not working as we expect)

  • Two consumers connect to node-0, subscribe to topic mask "$SharedSubscription/shared/shared/#"
  • Two consumers connect to node-1, subscribe to topic mask "$SharedSubscription/shared/shared/#"
  • Producer connects to node-1, sends multiple messages "Hello" to topic "shared/0"
  • Only consumers, connected to node-1, receive messages, distributed between those consumers
  • Producer connects to node-0, sends multiple messages "Hello" to topic "shared/0"
  • Only consumers, connected to node-0, receive messages, distributed between those consumers

We expect that case two would work in the same way as case 1, clients connected to any node and subscribe to a topic should receive messages from that topic that were published to any node.

Is this a bug or an intended scenario ?

This is intended behaviour.

Cluster scale best when as few messages as possible flow around the cluster (if each node has to process every message, adding another node does increase the amount of message processing capacity).

Shared subscriptions are considered high-throughput and apps that need them need to have instances connected to each node in the cluster

Here are a couple of slides from my "default" deck I tend to give:

image
image

Thanks a lot! We appreciate such a quick feedback.