Skip to content

aws-iot-device-sdk-python-v2 support mqtt5's share-pubsub,but aws-iot-device-sdk-java-v2 exception when use mqtt5's share-pubsub #463

@skiyubon

Description

@skiyubon

Describe the bug

image

Expected Behavior

aws-iot-device-sdk-java-v2 should be same with aws-iot-device-sdk-python-v2 when use mqtt5's share-pubsub

  1. Customized topic is work successful (both python-sdk and java-sdk)

  2. this bug occupy when topic is shadow's topic (only java-sdk error)
    cmdData.input_topic = "$aws/things/redbeeDoorbell/shadow/name/redbee_shadow/update";
    String input_sharedTopic = "$share/" + cmdData.input_groupIdentifier + "/" + cmdData.input_topic + "/accepted";

  3. aws-iot-device-sdk-python-v2 is work successful even if the topic is shadow's

Current Behavior

Exception in thread "mqtt5.sharedsubscription.SharedSubscription.main()" software.amazon.awssdk.crt.CrtRuntimeException: Mqtt5Client.subscribe: Unsuccessful subscribe - error code: -1 (aws_last_error: AWS_ERROR_MQTT5_UNSUBSCRIBE_OPTIONS_VALIDATION(5145), Invalid mqtt5 unsubscribe packet options value.) AWS_ERROR_MQTT5_UNSUBSCRIBE_OPTIONS_VALIDATION(5145)
at software.amazon.awssdk.crt.mqtt5.Mqtt5Client.mqtt5ClientInternalSubscribe(Native Method)
at software.amazon.awssdk.crt.mqtt5.Mqtt5Client.subscribe(Mqtt5Client.java:165)
at mqtt5.sharedsubscription.SharedSubscription.main(SharedSubscription.java:232)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception encountered: java.util.concurrent.ExecutionException: software.amazon.awssdk.crt.CrtRuntimeException: Error while processing mqtt5 operational state AWS_ERROR_MQTT5_OPERATION_PROCESSING_FAILURE(5158)

Reproduction Steps

mvn compile exec:java -pl samples/Mqtt5/SharedSubscription -Dexec.mainClass=mqtt5.sharedsubscription.SharedSubscription

Possible Solution

No response

Additional Information/Context

No response

SDK version used

software.amazon.awssdk.iotdevicesdk aws-iot-device-sdk 1.15.0

Environment details (OS name and version, etc.)

mac m1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions