Question

I am trying to implement a centralized logging server for my distributed app using pyzmq's built-in log handlers (see here). Although from an architectural standpoint I can understand the use of the PUB/SUB pattern, I cannot grasp the correct technical implementation of such a system.

Based on what I understand until now, since I would have N separate processes that would publish on N separate ports, I would really need N separate loggers in order to capture all the messages.

So this would mean that I need to open a separate "listener" process for every new publisher that I have on the system?

EDIT: To clarify the question: in the context of the tools provided with pyzmq, how do you implement a centralized logging server?

Was it helpful?

Solution

Solved it using a suggestion found here:

One interesting aspect of the zmq.SUB sockets is that they can connect to multiple endpoints, so that they receive messages from all the publishers.

The solution is to use one listener that "subscribes" to all the available publishers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top