Skip to content

[feature request] C++ and Python support include message header size when check maxMessageSize. #17188

Closed

Description

@shibd

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

PIP 132 Include message header size when check maxMessageSize for non-batch message on the client side

Current c++ the implementation also has this problem.

    const bool compressed = !canAddToBatch(msg);
    const auto payload =
        compressed ? applyCompression(uncompressedPayload, conf_.getCompressionType()) : uncompressedPayload;
    const auto compressedSize = static_cast<uint32_t>(payload.readableBytes());
    const auto maxMessageSize = static_cast<uint32_t>(ClientConnection::getMaxMessageSize());

    if (compressed && compressedSize > ClientConnection::getMaxMessageSize() && !chunkingEnabled_) {
        LOG_WARN(getName() << " - compressed Message payload size " << payload.readableBytes()
                           << " cannot exceed " << ClientConnection::getMaxMessageSize()
                           << " bytes unless chunking is enabled");
        handleFailedResult(ResultMessageTooBig);
        return;
    }

Solution

Refer java client PR: #14007

Alternatives

No response

Anything else?

This is a PR to match the Java implementation. It is best to first prove whether the problem exists in the C++ client, and then solve it.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. coderzc commented on Aug 23, 2022

    @coderzc
    Member

    Please assign it to me.

  2. github-actions commented on Sep 23, 2022

    @github-actions

    The issue had no activity for 30 days, mark with Stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions