code: @Override
      protected  void checkDeviceConnection(DeviceProxy device,
                          String attribute, DeviceData deviceData, String event_name) throws DevFailed {
  
          String deviceName = device.name();
          if (!device_channel_map.containsKey(deviceName)) {
              connect(device, attribute, event_name, deviceData);
              if (!device_channel_map.containsKey(deviceName)) {
                  Except.throw_event_system_failed("API_NotificationServiceFailed",
                          "Failed to connect to event channel for device",
                          "EventConsumer.subscribe_event()");
              }
          }
      }
docs: ===============================================================