code: public String create(SubscriptionCreationOptions options, String database) {
          if (options == null) {
              throw new IllegalArgumentException("Cannot create a subscription if options is null");
          }
  
          if (options.getQuery() == null) {
              throw new IllegalArgumentException("Cannot create a subscription if the script is null");
          }
  
          RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase()));
  
          CreateSubscriptionCommand command = new CreateSubscriptionCommand(_store.getConventions(), options);
          requestExecutor.execute(command);
  
          return command.getResult().getName();
      }
docs: Creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type.
  @param options Subscription options
  @param database Target database
  @return created subscription