ZeroMQ output needs a way to specify topics on pub/sub


So in my simplification of the zmq inputs and outputs, I missed a use case that I thought I tested. Additionally, sub is actually BROKEN because of this.

When you do topics in PUBSUB for 0mq, it works like this:

PUB side needs to use more than send_string. It needs to send a multipart message with topic as the first part THEN the message body. This is done with ZMQ::SNDMORE. We can also use sendmsgs with an array of parts (topic + message body)

On the SUB side, we need to handle stripping the topic off the message and consuming only the body. This is normally done with more_parts? or we can use recvmsgs which gives us an array of parts.

The lingering question is how do we handle defining this in the config syntax. While sockopt => ["ZMQ::SUBSCRIBE", "topic.*"] works for SUB, it doesn't work for PUB. Ideally we'd want to create a new config option simply called {{topic.



John E. Vincent


John E. Vincent



Fix versions

Affects versions