[zeromq-dev] Just installed zmq and have a question about wiring and running a broker.

Vineet Jain vinjvinj at gmail.com
Tue Apr 7 16:30:00 CEST 2009


> Well, that's how it works currently. Have a look a chatroom example: There's
> a chatroom application, say 100 display applications and 100 prompt



Ok I'm confused now. Lets take some psuedo-code as an example. If I
have two python apps which generate logs. I want to extend these apps
to push logs to a centralized messaging server so that an admin can
view them when necessary.

I have zmq_server running on 192.168.0.30

python app1 (running on 192.168.0.31)
Create an exchange on 192.168.0.30 if already not created. Add queue
"logging_192.168.0.30" to the exchange on 192.168.0.30
log messages to queue "logging_192.168.0.30"

python app2 (running on 192.168.0.32)
Create an exchange on 192.168.0.30 if already not created. Add queue
"logging_192.168.0.31" to the exchange on 192.168.0.30
log messages to queue "logging_192.168.0.31"

admin client (running on 192.168.0.33)
Connects to exchange on 192.168.0.30 and reads messages from the two
queues "logging_192.168.0.30" and "logging_192.168.0.31"

Corner cases:
- If python app1 and python app2 both shut down and they have logged
say 30 messages to the queue. Can the admin client program still
retrieve the messages. This is a critical requirement for logging and
why I would want to have a centralized server.
- If the admin client program was not connected and the python app1
and python app2 have logged messages to the two queues and for some
reason they shutdown. Then the admin admin client connects to the
zmq_server can it retrieve the messages that were sent to the queue
before shutting down?
- Is it possible to automatically discard messages to a q if there are
no consumers setup?



More information about the zeromq-dev mailing list