[Time] Name | Message |
[02:05] mikko
|
Plouj-: which language ?
|
[02:05] mikko
|
it should generate EFSM
|
[02:06] mikko
|
if you are using REQ/REP sockets
|
[04:09] Plouj-
|
mikko: C
|
[04:11] Plouj-
|
I used this as the server code: http://fpaste.org/iBjM/ and this as the client code: http://fpaste.org/Bcuq/ and the server only printed lines like "Received: Hello"
|
[04:56] sustrik
|
Plouj-: you mean the peer have ignored the malformed message, right?
|
[04:56] sustrik
|
yes, that's how 0mq handles network errors
|
[04:57] sustrik
|
ignore and retry
|
[19:58] zvi
|
hi, what's the recommended way to "unsubscribe"/disconnect subscriber socket with identity from specific publisher socket?
|
[20:05] sustrik
|
either zmq_setsockopt (ZMQ_UNSUBSCRIBE) or zmq_clos()
|
[20:05] sustrik
|
zmq_close()
|
[20:05] mikko
|
does zmq close remove it from publisher side as well?
|
[20:05] mikko
|
or does the publisher keep buffering?
|
[20:06] sustrik
|
mikko: you are right, it does not
|
[20:06] sustrik
|
so unsubscribing seems to be the only option
|
[20:07] mikko
|
unsubsribing works for 3.0?
|
[20:07] zvi
|
sustrik, I have a fairly large cluster of nodes, each one with publisher endpoint
|
[20:08] sustrik
|
it should
|
[20:11] zvi
|
so I need to send messages in format <<NodeIndex:8 bit, Message >>, then subscribe to each node's publisher using zmq_setsockopt(Subscriber, ZMQ_SUBSCRIBE, <<NodeIndex:8bit>>), then zmq_connect( subscriber, "tcp://node endpoint"). And to disconnect zmq_setsockopt(Subscriber, ZMQ_UNSUBSCRIBE, <<NodeIndex:8bit>>) ?
|
[20:12] zvi
|
sorry for the pseudocode mizing C and Erlang ;)
|
[20:12] zvi
|
mixing
|
[20:13] zvi
|
sustrik, wouldn't zmq_close disconnect from all publishers to which subscriber is connected?
|
[20:18] zvi
|
Also aren't filters implemented on the receiving side? Therefore If my publisher node is dead unsubscribing from it will give me nothing. I just want to clean things properly, so connections to down nodes will not hang forever.
|
[20:21] zvi
|
Another question, is Identity should be globally unique or just unique per socket pair?
|
[20:50] crazed
|
hey is it possible to read the raw data from a zeromq publisher using tcpdump?
|
[21:01] mikko
|
crazed: yes, of course
|
[21:12] crazed
|
mikko: do you have an example?
|
[21:13] mikko
|
crazed: example of what?
|
[21:14] crazed
|
well actually nvm
|
[21:14] mikko
|
it's no different from any other tcp stream
|
[21:14] crazed
|
yeah lol
|
[21:15] crazed
|
i'm trying to use the collectd zeromq plugin to publish messages, but i can't seem to get any code to subscribe to them
|
[21:15] crazed
|
though i see traffic on the ports
|
[21:15] mikko
|
are you actually subscribing to anything on the client code?
|
[21:15] mikko
|
by default it's subscribed to nothing
|
[21:16] crazed
|
i'm using python
|
[21:16] crazed
|
and here's the setsockopt line: socket.setsockopt(zmq.SUBSCRIBE, '')
|
[21:16] mikko
|
what does the client code look like?
|
[21:17] crazed
|
http://pastebin.com/wm9iW1Gc
|
[21:18] crazed
|
if i write my own server that publishes to the same socket, that code reads it without an issue
|
[21:18] mikko
|
is it actually listening on 6666 ?
|
[21:23] crazed
|
hm
|
[21:23] crazed
|
doesn't look like collectd is binding
|
[21:24] mikko
|
are you sure that collectd doesnt try to connect?
|
[21:24] mikko
|
change socket.connect to socket.bind in your client code
|
[21:25] crazed
|
mikko: genius, i didn't even think about that
|
[21:25] crazed
|
i'm a zmq noob and didn't realize you could do it athat way
|
[21:26] crazed
|
cool
|
[23:52] crazed
|
is it typical to have sub do the binding and pub do the connceting, or does it go the other way?
|
[23:54] crazed
|
hm the guide shows an example where the publisher binds and the subscriber connects
|