class WriteWithErrors implements Function<PubsubMessage, CompletableFuture<Void>> {

  @Override
  public CompletableFuture<Void> apply(PubsubMessage message) {
    return apply(message, 1);
  }

  public  WriteWithErrors(Function<PubsubMessage, CompletableFuture<Void>> write,
      Function<PubsubMessage, CompletableFuture<Void>> errors, int maxAttempts);

}