Giter Club home page Giter Club logo

Comments (5)

statelessness avatar statelessness commented on July 18, 2024 1

Hi John.

Thanks for your suggestion. I confirm you that it's the same bug. I made the following change to my code and it worked properly:

private void publish(final String topic, final MqttEventWrapper mqttEventWrapper) {
    final byte[] payload = marshallToByteArray(mqttEventWrapper);
    iotDataPlaneClient.publish(builder -> builder
                .overrideConfiguration(o -> o.putHeader("Content-Length", String.valueOf(payload.length)))
                .payload(SdkBytes.fromByteArray(payload))
                .qos(1)
                .topic(topic));
}

Best regards,

from aws-sdk-java-v2.

joviegas avatar joviegas commented on July 18, 2024

Looks similar to #4920 , we are still working on this
To confirm can you please send the Content-length header = Length of the payload

//payloadLength =calcualatePayloadLength();
// In the request add the overrideConfiguration as below


.overrideConfiguration(o -> o.putHeader("Content-Length",  String.valueOf(payloadLength)))

from aws-sdk-java-v2.

zoewangg avatar zoewangg commented on July 18, 2024

This is fixed in #4920 Could you try with the latest version?

from aws-sdk-java-v2.

statelessness avatar statelessness commented on July 18, 2024

Hi Zoe.

Just tested with version 2.24.10 of AWS SDK and it's working fine now (no need to specify Content-Length header from my code).

Thanks to the team.

Best regards,

from aws-sdk-java-v2.

github-actions avatar github-actions commented on July 18, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

from aws-sdk-java-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.