docs: private EventRegistration registerListenerInternal(String serviceName, String topic, EventFilter filter, Object listener,
                                                         boolean localOnly) {
          if (listener == null) {
              throw new IllegalArgumentException("Listener required!");
          }
          if (filter == null) {
              throw new IllegalArgumentException("EventFilter required!");
          }
          EventServiceSegment segment = getSegment(serviceName, true);
          String id = UuidUtil.newUnsecureUuidString();
          Registration reg = new Registration(id, serviceName, topic, filter, nodeEngine.getThisAddress(), listener, localOnly);
          if (!segment.addRegistration(topic, reg)) {
              return null;
          }
  
          if (!localOnly) {
              Supplier<Operation> supplier = new RegistrationOperationSupplier(reg, nodeEngine.getClusterService());
              invokeOnAllMembers(supplier);
          }
          return reg;
      }