Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does ZMQ expose any internal logging? If so, how do you use it?

Tags:

zeromq

I've found references in a few places to some internal logging capabilities of ZMQ. The functionality that I think might exist is the ability to connect to either or both of a inproc or ipc SUB socket and listen to messages that give information about the internal state of ZMQ. This would be quite useful when debugging a distributed application. For instance, if messages are missing/being dropped, it might shed some light on why they're being dropped.

The most obvious mention of this is here: http://lists.zeromq.org/pipermail/zeromq-dev/2010-September/005724.html, but it's also referred to here: http://lists.zeromq.org/pipermail/zeromq-dev/2011-April/010830.html. However, I haven't found any documentation of this feature.

Is some sort of logging functionality truly available? If so, how is it used?

like image 262
scott Avatar asked Apr 05 '13 14:04

scott


1 Answers

Some grepping through the git history eventually answered my question. The short answer is that a way for ZMQ to transmit logging messages to the outside world was implemented, but it was never used to actually send logging messages by the rest of the code base. After a while it was removed since nothing used it.

The commit that originally added it making use of an inproc socket:

  • https://github.com/zeromq/libzmq/commit/ce0972dca3982538fd123b61fbae3928fad6d1e7

The commit that added a new "sys" socket type specifically to support the logging:

  • https://github.com/zeromq/libzmq/commit/651c1adc80ddc724877f2ebedf07d18e21e363f6

JIRA issue, pull request, and commit to remove the functionality:

  • https://zeromq.jira.com/browse/LIBZMQ-336
  • https://github.com/zeromq/libzmq/pull/277
  • https://github.com/zeromq/libzmq/commit/5973da486696aca389dab0f558c5ef514470bcd2
like image 154
scott Avatar answered Oct 19 '22 10:10

scott