Weather update proxy in Java

package guide;

import org.zeromq.SocketType;
import org.zeromq.ZMQ;
import org.zeromq.ZMQ.Socket;
import org.zeromq.ZContext;


  • Weather proxy device.

public class wuproxy
public static void main(String[] args)
// Prepare our context and sockets
try (ZContext context = new ZContext()) {
// This is where the weather server sits
Socket frontend = context.createSocket(SocketType.SUB);

// This is our public endpoint for subscribers
Socket backend = context.createSocket(SocketType.PUB);

// Subscribe on everything

// Run the proxy until the user interrupts us
ZMQ.proxy(frontend, backend, null);