Skip to content

Conversation

MakendranG
Copy link

Issue #, if available:
N/A

Description of changes:
Added required keepAliveIntervalSeconds parameter in the MQTT5 PubSub React sample as it's a mandatory field according to: https://github.com/awslabs/aws-crt-nodejs/blame/main/lib/common/mqtt5_packet.ts#L878

Changes made:

  • Added keepAliveIntervalSeconds: 30 to the connect packet configuration in PubSub React sample
  • This parameter is required as per MQTT5 specification and cannot be optional

This fixes the TypeScript compilation error:
TS2345: Argument of type '{ clientId: string; }' is not assignable to parameter of type 'ConnectPacket'.
Property 'keepAliveIntervalSeconds' is missing in type '{ clientId: string; }' but required in type 'ConnectPacket'.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant