Skip to content

Add required keepAliveIntervalSeconds in MQTT5 PubSub React sample#551

Closed
MakendranG wants to merge 1 commit into
aws:mainfrom
MakendranG:patch-1
Closed

Add required keepAliveIntervalSeconds in MQTT5 PubSub React sample#551
MakendranG wants to merge 1 commit into
aws:mainfrom
MakendranG:patch-1

Conversation

@MakendranG
Copy link
Copy Markdown
Contributor

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.

@rakshil14-2
Copy link
Copy Markdown
Contributor

Fix the samples: #616

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.

2 participants