code: private Class<?> resolveListenerGeneric(final MethodGenericsContext generics, final Class listenerType,
                                              final int position) {
          // TO BE IMPROVED here must be correct resolution of RequiresRecordConversion generic, but it requires
          // some improvements in generics-resolver
          // In most cases even this simplified implementation will work
          if (RequiresRecordConversion.class.isAssignableFrom(listenerType)
                  && listenerType.getTypeParameters().length > 0) {
              try {
                  // questionable assumption that the first generic is a target type, but will work in most cases
                  return generics.resolveGenericOf(generics.currentMethod().getGenericParameterTypes()[position]);
              } catch (Exception ex) {
                  // never happen
                  throw new IllegalStateException("Parameter generic resolution failed", ex);
              }
          }
          return Object.class;
      }
docs: Resolve generic specified directly in listener parameter (e.g. {@code QueryListener<Model>}). It would be
  useful if, for some reason, correct type could not be resolved from listener instance (in most cases it
  would be possible).
  
  @param generics     repository method generics context
  @param listenerType type of specified listener
  @param position     listener parameter position
  @return resolved generic or Object