public static Context context(int threads) { try { return ZMQ.context(threads); } catch (UnsatisfiedLinkError e) { LOG.error("context", e); } return null; }
public KernelSocketsZMQ(KernelFunctionality kernel, Config configuration, SocketCloseAction closeAction) { this.closeAction = closeAction; this.kernel = kernel; this.hmac = new HashedMessageAuthenticationCode(configuration.getKey()); this.context = ZMQ.context(1); configureSockets(configuration); }
ctx = ZMQ.context(ioThreads);
public void Start() { context = ZMQ.context(1); thread = new Thread(this); thread.setName("ZeroMQBasedConnector Receive Loop"); thread.start(); }
/** * A Topic handler with no publishing (just subscribes) * @param binding String. The binding for the * @param addresses List. My TCP address and topics for listening. * @throws Exception */ public RTopic(List<String> addresses) throws Exception { mapper.setSerializationInclusion(Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); context = ZMQ.context(1); subscriber = new MSubscriber(this,addresses); }
public RTopic(String address) throws Exception { context = ZMQ.context(1); mapper.setSerializationInclusion(Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); if (address.contains("&")) { String [] parts = address.split("&"); subscriber = new Subscriber(this,parts[0]); subscriber.subscribe(parts[1]); } else subscriber = new Subscriber(this,address); } /**
@Override public void setup(Context.OperatorContext ctx) { context = ZMQ.context(1); sock = context.socket(ZMQ.PULL); sock.connect(zmqAddress); }
public void connect() { context = ZMQ.context(1); requester = context.socket(ZMQ.REQ); requester.connect("tcp://" + host + ":" + port); }
@Override public void setup(Context.OperatorContext ctx) { context = ZMQ.context(1); sock = context.socket(ZMQ.PULL); sock.connect(zmqAddress); }
@Override public void prepare() { ZMQ.Context context = ZMQ.context(1); publisher = context.socket(ZMQ.PUB); publisher.bind("tcp://*:5563"); }
public Publisher(String binding, String topicName) throws Exception { mapper.setSerializationInclusion(Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); context = ZMQ.context(1); publisher = context.socket(ZMQ.PUB); publisher.bind(binding); Thread.sleep(100); //System.out.println("Starting Publisher.."); publisher.setIdentity("B".getBytes()); publisher.setLinger(5000); publisher.setHWM(0); this.topicName = topicName; }
@Override public void setup(OperatorContext ctx) { logger.debug("O/P setup"); context = ZMQ.context(1); publisher = context.socket(ZMQ.PUB); publisher.bind(url); syncservice = context.socket(ZMQ.REP); syncservice.bind(syncUrl); }
@Override public void setup(OperatorContext ctx) { logger.debug("O/P setup"); context = ZMQ.context(1); publisher = context.socket(ZMQ.PUB); publisher.bind(url); syncservice = context.socket(ZMQ.REP); syncservice.bind(syncUrl); }
@Override public void setup(OperatorContext ctx) { context = ZMQ.context(1); subscriber = context.socket(ZMQ.SUB); subscriber.connect(url); subscriber.subscribe(filter.getBytes()); syncclient = context.socket(ZMQ.REQ); syncclient.connect(syncUrl); syncclient.send("".getBytes(), 0); }
@Override public void setup(OperatorContext ctx) { context = ZMQ.context(1); subscriber = context.socket(ZMQ.SUB); subscriber.connect(url); subscriber.subscribe(filter.getBytes()); syncclient = context.socket(ZMQ.REQ); syncclient.connect(syncUrl); syncclient.send("".getBytes(), 0); }
public StatePublisher(int port) { context = ZMQ.context(1); socket = context.socket(ZMQ.PUB); socket.bind("tcp://*:" + port); this.setDaemon(true); this.start(); }
@Init public void init() { // Windows requires the ZMQ library to be loaded as the JZMQ library is linked to it and Windows is unable to resolve it relative to the JZMQ library // System.loadLibrary("zmq"); loadLibrary(hostInfo); context = ZMQ.context(1); controlSocket = context.socket(ZMQ.PUB); controlSocket.bind("inproc://fabric3"); }
@Init public void init() { // Windows requires the ZMQ library to be loaded as the JZMQ library is linked to it and Windows is unable to resolve it relative to the JZMQ library // System.loadLibrary("zmq"); ZMQLibraryInitializer.loadLibrary(hostInfo); context = ZMQ.context(1); controlSocket = context.socket(ZMQ.PUB); controlSocket.bind("inproc://fabric3"); }
private void initZeroMq() { context = ZMQ.context(threadNum); socket = context.socket(ZMQ.PUSH); socket.connect("tcp://" + getServername() + ":" + getPort()); }
public void setup() { context = ZMQ.context(1); logger.debug("Publishing on ZeroMQ"); publisher = context.socket(ZMQ.PUB); publisher.bind(pubAddr); syncservice = context.socket(ZMQ.REP); syncservice.bind(syncAddr); }