Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
See pages that link to and include this page.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.
I am confused here. How is the message distribution tree created ? Is every member of the message distribution tree a subscriber ?
I am trying to use zero mq but unable to understand the implications on the network traffic in pub sub pattern.
I thought zero mq has to be agnostic for the underlying network topology but it seems it is not. How does every node knows what to forward and what to not (for e.g. : in eth network , where there can be millions subscriber and publisher , message tree does not sound a feasible to me . What about the hops that do not even know about the existence of zero mq , how would they forward packets to subscribers connected to them , for them it would be just a normal packet , so they would just forward multiple copies of data packets even if its the same packet ?
I am not networking expert so may be I am missing something obvious about message tree and how it is even created ?
Could you please give certain example cases how this distribution tree is created and exactly which nodes are xpub and xsub sockets created ?
Also when you say "Recall that a device is just a pair of ØMQ sockets connected by user code." , Did i miss something in any documentation , i never knew this definition of a device ever mentioned in zero mq . Is device something like a broker , in the whole article it seemed like device is just any general intermediary hop which does not know anything about zero mq sockets (just a random network hop) , if it is indeed a broker kind of thing , does that mean for pub sub , all nodes in messaging tree have to satisfy the definition of being a device and hence it is not a broke less design ?
I am confused by a lot of terminology (messaging tree , device) in this documentation but not a clear definition . It would be really helpful if you could include well defined definitions for the terms used for beginners like me.
Could you please elaborate on how message tree is created and what are device , does that user code has to be on every node of message tree (to make it a device).
Also in the tree diagram (consist P,D,C) , I initially assumed C and C are two subscribers and P the only publisher (D just random hop), but now it seems that we have D as the zero mq <device> . Does C subscribes to D and D subscribes to P ? or bot the C just subscribe to P (To be more generic , does each node subscribe to its parent only in the <message tree> ). Could you define some characteristics/properties of message tree or is it just random tree generated when both c subscribe to P (Sorry for the novice questions but the article really confused me ).
Thanks
I can't find any example code for XPUB XSUB hubs. Could you please publish an example?
The Guide has an example, see http://zguide.zeromq.org/page:all#Last-Value-Caching
Portfolio
Thanks, that was helpful. It more or less works like the example (minus last value caching). The only mystery is that I'm not seeing the subscribe/unsubscribe messages coming in on the XPUB socket of the hub. I'm using jzmq Poller.poll to watch for POLLIN events at the hub side and simple socket.send (to a SUB) to talk to it. Is setting the topic via the sockopts on the SUB socket enough to trigger the messages?
Yes, the sub/unsub messages are triggered when you set the socket options (on a connected socket) or when a sub socket that already has subscriptions connects.
Portfolio