1

I want to prevent subscribers from subscribing to all topics in ZeroMQ. My idea is to use an XPUB/XSUB proxy and drop subscriptions to all topics in the proxy. However, my concern is that all messages would go through the proxy in this case, not just the subscription messages. Wouldn't it be a performance issue? Is it possible to have only subscription messages to go through the proxy and regular messages directly between PUB/SUB sockets?

Michał Fronczyk
  • 1,859
  • 4
  • 24
  • 29

1 Answers1

0

It is possible to create something like you talk about with zmq, but it is beyond the scope of xsub/xpub. It's even almost beyond the scope of pub/sub.

By using the router and dealer you can build a protocol for doing this behavior, and in extreme cases it could be usable, maybe necessary.

But, my guess is it isn't a problem for you yet. If your not sending huge amounts of data, this will perform great for you. You could add multiple xsub/xpub servers and distribute the load by having each subscriber connect to different servers (load balancing). But again, only start engineering such setups when needed.

user3666197
  • 1
  • 6
  • 50
  • 92
Emil Ingerslev
  • 4,645
  • 2
  • 24
  • 18
  • I'm not sure if I understand. Are you saying that I shouldn't bother with preventing subscribers from subscribing to all topics, or that it should be fine with an XPUB/XSUB proxy dropping all subscriptions to all topics, even if all traffic will go through a proxy? – Michał Fronczyk May 05 '15 at 21:13
  • My last section of the answer focus on the performance question. I don't think you'll get see it. How much data do send? Like how many how many packages pr second, how big packages and how many subscribers? – Emil Ingerslev May 06 '15 at 04:24