@Override
    public void add(final Path sourceDir) {
        final List<DestinationCopy> destinationCopies = new ArrayList<>(destinationCount);
        try {
            for (final ForwardDestination destination : destinations) {
                final Path copy = copiesDirProvider.get();
                copyContents(sourceDir, copy);
                destinationCopies.add(new DestinationCopy(destination, copy));
            }

            final List<Exception> exceptions = new ArrayList<>(destinationCount);
            for (int i = 0; i < destinationCopies.size(); i++) {
                final DestinationCopy destinationCopy = destinationCopies.get(i);
                // This will move to the copy to the dest
                final ForwardDestination destination = destinationCopy.destination;
                final Path copyDir = destinationCopy.copyDir;
                try {
                    destination.add(copyDir);
                    // Null the destinationCopy as it has been moved and doesn't need to be cleaned up
                    destinationCopies.set(i, null);
                } catch (Exception e) {
                    LOGGER.debug("Error adding '{}' to destination {}: {}",
                            copyDir, destination.asString(), LogUtil.exceptionMessage(e), e);
                    exceptions.add(new RuntimeException(LogUtil.message(
                            "Error adding {} to destination {}",
                            copyDir, destination.asString())));
                }
            }
            if (exceptions.isEmpty()) {
                // No problems with any of the copies so bin the source.
                // There is the risk that we send something twice but that is preferable to dropping data.
                cleanupDirQueue.add(sourceDir);
            } else {
                // Leave the source to try again after reboot
                // Wrap all the exceptions encountered
                throw new RuntimeException(LogUtil.message(
                        "Error adding to {} destinations:\n{}",
                        exceptions.size(),
                        exceptions.stream()
                                .map(Exception::getMessage)
                                .collect(Collectors.joining("\n"))),
                        exceptions.getFirst());
            }
        } catch (final IOException e) {
            LOGGER.error(e::getMessage, e);
            throw new UncheckedIOException(e);
        } finally {
            // Get rid of any copies that haven't already been moved
            destinationCopies.stream()
                    .filter(Objects::nonNull)
                    .map(DestinationCopy::copyDir)
                    .forEach(cleanupDirQueue::add);
        }
    }
Forwards each sourceDir to more than one destination.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/MultiForwardDestination.java