Balancing the handling of Topic Publish

I created the topic Duplicate Calls to WAMP Procedures When crossbar roundrobin Is Used with Replica Pods, but what I think I’m really after is shared subscriptions.

I notice that this question was asked back in 2018 in Shared subscriptions and the crossbar docs don’t indicate that shared subscription functionality has been added.

What I’m after is being able to subscribe to a topic (e.g., user.updated) so that only one ‘component’ (replica) handles a publish of that topic. My scenario is microservices deployed via kubernetes cluster with some services having replica pods.

Only one of the following handles ‘user.updated’:

  • user-server-pod-1
  • user-server-pod-2
  • user-server-pod-3

Also handles ‘user.updated’:

  • another-server-pod

Is this a possibility? Or is there some kind of configuration/scenario that I could use to achieve this?

You’re right, things like that have been discussed in the past on WAMP, under different names: “sharded/parallel/partitioned subscriptions” (and registrations). It’s not currently properly spec’ed nor implemented anywhere to my knowledge, but it could be added and would fit seamlessly into the existing WAMP design …

Cheers,
/Tobias

1 Like