Pub-Sub envelope publisher in Java

package guide;

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

* Pubsub envelope publisher

public class psenvpub

public static void main(String[] args) throws Exception
// Prepare our context and publisher
try (ZContext context = new ZContext()) {
Socket publisher = context.createSocket(SocketType.PUB);

while (!Thread.currentThread().isInterrupted()) {
// Write two messages, each with an envelope and content
publisher.send("We don't want to see this");
publisher.send("We would like to see this");