private void delayPost() {
        try {
            final Instant startTime = Instant.now();
            final Duration forwardDelay = forwardQueueConfig.getForwardDelay().getDuration();
            LOGGER.trace("'{}' - adding delay {}", destinationName, forwardDelay);
            final long notBeforeEpochMs = startTime.plus(forwardDelay).toEpochMilli();
            long delay = notBeforeEpochMs - System.currentTimeMillis();

            // Loop in case the delay is long and proxy shuts down part way through
            while (delay > 0
                   && !proxyServices.isShuttingDown()
                   && !Thread.currentThread().isInterrupted()) {

                final long sleepMs = Math.min(ONE_SECOND_IN_MS, delay);
                ThreadUtil.sleep(sleepMs);
                if (sleepMs == ONE_SECOND_IN_MS) {
                    delay = notBeforeEpochMs - System.currentTimeMillis();
                } else {
                    break;
                }
            }
        } catch (Exception e) {
            // Swallow as this is only for testing
            LOGGER.error("Error while delaying the forward: {}", LogUtil.exceptionMessage(e), e);
        }
    }
Holds the state relating to retries. Held in binary form.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/RetryingForwardDestination.java