code: public int subscribe_event(DeviceProxy device,
                                 int event,
                                 CallBack callback,
                                 int max_size,
                                 boolean stateless) throws DevFailed {
          ApiUtil.printTrace("INTERFACE_CHANGE: trying to subscribe_event to " + device.name());
          int id;
          //  If already connected, subscribe directly on same channel
          EventConsumer   consumer = isChannelAlreadyConnected(device);
          if (consumer!=null) {
              id = consumer.subscribe_event(device, event, callback, max_size, stateless);
          }
  
          //  If ZMQ jni library can be loaded, try to connect on ZMQ event system
          id = ZmqEventConsumer.getInstance().subscribe_event(
                  device, event, callback, max_size, stateless);
  
          return id;
      }
docs: ===============================================================