Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions samples/browser/react_sample/src/PubSub5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ function createClient(provider: AWSCognitoCredentialsProvider) : mqtt5.Mqtt5Clie
let builder: iot.AwsIotMqtt5ClientConfigBuilder = iot.AwsIotMqtt5ClientConfigBuilder.newWebsocketMqttBuilderWithSigv4Auth(
AWS_IOT_ENDPOINT,
wsConfig
)
);
builder.withConnectProperties({
clientId: "test-" + Math.floor(Math.random() * 100000000)
clientId: "test-" + Math.floor(Math.random() * 100000000),
keepAliveIntervalSeconds: 30 // Mandatory field added
});

let client : mqtt5.Mqtt5Client = new mqtt5.Mqtt5Client(builder.build());
Expand Down