Skip to content

WebSocket connection close on reconnect #567

@paparent

Description

@paparent

Describe the bug

AWS IoT Core limits each SUBSCRIBE packet to a maximum of 8 topics.

When a connection is lost in the browser, on reconnect with clean session turned on, it subscribes to every topics at once.

The MQTT.js now support batching since version 5.13.0: mqttjs/MQTT.js#1995

Expected Behavior

On reconnect, subscribe to topic in batch of 8 maximum.

Current Behavior

On reconnect, it subscribe to all topics.

Reproduction Steps

Subscribe to more than 8 topics.

Trigger a WebSocket failure. You can queryObjects(WebSocket), find the object and call .close() on it.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.23.0

Environment details (OS name and version, etc.)

Browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions