private ResponseStatus logResponseToSendLog(final Duration duration,
                                                final ClassicHttpResponse response,
                                                final AttributeMap attributeMap,
                                                final LongSupplier contentLengthSupplier) {
//        StroomStatusCode stroomStatusCode;
//        String receiptId;
////        String errorMsg = null;
//        EventType eventType = EventType.SEND;
        final long contentLength = contentLengthSupplier.getAsLong();
        try {
            final ResponseStatus responseStatus = checkConnectionResponse(response, attributeMap);
            final StroomStatusCode stroomStatusCode = responseStatus.stroomStatusCode;
            final String receiptId = responseStatus.receiptId;
            LOGGER.debug(() -> LogUtil.message(
                    "'{}' - stroomStatusCode: {}, receiptId {}, contentLength: {}, compression: '{}'",
                    forwarderName,
                    stroomStatusCode,
                    receiptId,
                    ByteSize.ofBytes(contentLength),
                    attributeMap.get(StandardHeaderArguments.COMPRESSION)));

            final EventType eventType = stroomStatusCode == StroomStatusCode.OK
                    ? EventType.SEND
                    : EventType.ERROR;

            logStream.log(
                    SEND_LOG,
                    attributeMap,
                    eventType,
                    forwardUrl,
                    stroomStatusCode,
                    receiptId,
                    contentLength,
                    duration.toMillis());

            return responseStatus;
//        } catch (StroomStreamException e) {
//            LOGGER.debug(() -> LogUtil.message("'{}' - stroomStatusCode: {}",
//                    forwarderName, e.getStroomStreamStatus().getStroomStatusCode()));
//            stroomStatusCode = e.getStroomStreamStatus().getStroomStatusCode();
//            if (stroomStatusCode == StroomStatusCode.FEED_IS_NOT_SET_TO_RECEIVE_DATA) {
//                LOGGER.debug("stroomStatusCode: {}, rejected by destination, so no point in retrying",
//                        stroomStatusCode);
//            } else {
//                errorMsg = e.getMessage();
//                throw e;
//            }
        } catch (Exception e) {
            LOGGER.debug(() ->
                    LogUtil.message("'{}' - Exception reading response {}",
                            forwarderName, LogUtil.exceptionMessage(e), e));
//            eventType = EventType.ERROR;
//            errorMsg = e.getMessage();
            throw e;
//        } finally {
//            final Duration duration = Duration.between(startTime, Instant.now());
//            if (stroomStatusCode == null) {
//                stroomStatusCode = StroomStatusCode.fromHttpCode(response.getCode());
//            }
////            switch (stroomStatusCode) {
////                case OK -> EventType.SEND;
////                case FEED_IS_NOT_SET_TO_RECEIVE_DATA -> EventType.REJECT
////            }
//            logStream.log(
//                    SEND_LOG,
//                    attributeMap,
//                    eventType,
//                    forwardUrl,
//                    stroomStatusCode,
//                    receiptId,
//                    contentLength,
//                    Duration.between(startTime, Instant.now()).toMillis(),
//                    errorMsg);
        }
    }
Handler class that forwards the request to a URL.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/HttpSender.java