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?
-
4This 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?– Sean HoulihaneCommented Jan 19, 2017 at 8:25
-
Learn the Basics can help you getting started. Try it and ask about a more specific problem.– Bence KaulicsCommented 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?– YasminCommented Mar 2, 2019 at 21:50
Add a comment
|
1 Answer
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.