@Override
    public boolean asyncSendMessage(HttpEventInfo eventInfo, MsgSendCallback callback, ProcessResult procResult) {
        validParamsNotNull(eventInfo, callback, procResult);
        if (!this.isStarted()) {
            return procResult.setFailResult(ErrorCode.SDK_CLOSED);
        }
        boolean gotPermits = false;
        try {
            if (this.isMetaInfoUnReady()) {
                return procResult.setFailResult(ErrorCode.NO_NODE_META_INFOS);
            }
            if (!tryAcquireCachePermits(eventInfo.getBodySize(), procResult)) {
                return false;
            }
            gotPermits = true;
            // check package length
            if (!isValidPkgLength(eventInfo, this.getAllowedPkgLength(), procResult)) {
                return false;
            }
            return httpClientMgr.asyncSendMessage(new HttpAsyncObj(eventInfo, callback), procResult);
        } finally {
            if (procResult.isSuccess()) {
                metricHolder.addAsyncHttpSucPutMetric(
                        eventInfo.getGroupId(), eventInfo.getStreamId(), eventInfo.getMsgCnt());
            } else {
                if (gotPermits) {
                    releaseCachePermits(eventInfo.getBodySize());
                }
                metricHolder.addAsyncHttpFailPutMetric(procResult.getErrCode(),
                        eventInfo.getGroupId(), eventInfo.getStreamId(), eventInfo.getMsgCnt());
            }
        }
    }
HTTP(s) Message Sender class

Used to define the HTTP(s) sender common methods
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/sender/http/InLongHttpMsgSender.java