I have multiple processes running on multiple machines using log4j (2.11). I need to consolidate the logging messages to be displayed on the front-end, and would like each process to use a ZeroMQ Appender to publish the log messages to a single connection. I will then have one subscriber receiving the messages, performing the consolidation, and then displaying the log messages.
I have a toy application working with one publisher (process logging); however, when multiple processes try to connect to the same endpoint, I receive the "Address already in use" error message. Which (most likely) means the log4j ZeroMQ (JeroMQ) appender is doing the "binding," since only one process can bind a zmq socket.
Is there a configuration option to have the log4j ZeroMQ Appender perform a "connect" instead of the "bind" or is there another option available to accomplish the same goal.
PUB/SUB
archetype, unless your infrastructure is willing to operate many-PUB
-s + many-SUB
-s, as if building anN+M
-fault-resilience into your loging service. An ordinaryPUSH/PULL
would fit better, as there is Zero-need for subscription based TOPIC-filtering in doing plain logging, isn't it? ( BTW, is the2.11
above referring to the ZeroMQ native API version? Many features now present in native API v4.2+ are not present there, so quite important to be aware of that ) – user36661972.11
is referring to the version of Log4J I am using (currently the latest) which offers a ZeroMQ (JeroMQ) Appender. Ideally, the subscriber will receive the logging messages without having to poll the other processes. I'll read on thePUSH/PULL
architecture to see if that would be a better fit; however, with thePUB/SUB
I can receive all of the messages without having to subscribe to each individual topic. So, unless I'm misunderstanding something, the TOPIC-filtering will not be a concern. – Walter