// -p primary server, at tcp://localhost:5001
// -b backup server, at tcp://localhost:5002
ZContext ctx = new ZContext();
Socket statepub = ctx.createSocket(ZMQ.PUB);
Socket statesub = ctx.createSocket(ZMQ.SUB);
statesub.subscribe("".getBytes());
Socket frontend = ctx.createSocket(ZMQ.ROUTER);
bstarsrv fsm = new bstarsrv();
if (argv.length == 1 && argv[0].equals("-p")) {
System.out.printf("I: Primary active, waiting for backup (passive)\n");