I am trying to get messages from an MQTT broker and insert that messages into ZeroMQ. What do I need to do to connect an MQTT broker to ZeroMQ in java?

  • 4
    This question seems (to a non-expert) quite broad. What have you done so far, and what part of this are you struggling with. Where are your references? Commented Jan 19, 2017 at 8:25
  • Learn the Basics can help you getting started. Try it and ask about a more specific problem. Commented Jan 19, 2017 at 10:15
  • I was just wondering, were you able to do that ?. I have created a proxy between MQTT broker publisher and ZeroMQ as a subscriber using XPUB and ZSUB, however, it seems that the ZeroMQ doesn't receive any message from MQTT broker, any suggestions?
    – Yasmin
    Commented Mar 2, 2019 at 21:50

1 Answer 1


Basically what you need to do is merge together the MQTT subscriber code with a ZeroMQ sender in Java, such that when you receive a message from the MQTT queue, it gets transferred to the 0MQ for 0MQ listeners to receive.

I haven't used MQTT from Java, but a popular library seems to be Paho.

The 0MQ documentation and example code is excellent, and a Java example can be found here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.