New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@soluzioni-futura/aws-mqtt-client-utils

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soluzioni-futura/aws-mqtt-client-utils

## Quick start Install the package ```sh $ npm i @soluzioni-futura/aws-mqtt-client-utils ```

1.0.3
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
6
Weekly downloads
 
Created
Source

aws-mqtt-client-utils

Quick start

Install the package

$ npm i @soluzioni-futura/aws-mqtt-client-utils

Usage

    import getAwsMqttClient from "@soluzioni-futura/aws-mqtt-client-utils"

    const mqttClient = getAwsMqttClient({
      awsAccessKeyId: <your-access-key>,
      awsSecretAccessKey: <your-secret-key>,
      awsSessionToken: <your-session-token>,
      iotEndpoint: <your-iot-endpoint>,
      region: <your-region>
    })

    mqttClient.onMessageArrived = (message) => {
      console.log("New message arrived on", message.topic)
      console.log(JSON.parse(message.payloadString))
    }

    mqttClient.connect({
      onSuccess: () => {
        console.log("Connected!")
        mqttClient.subscribe("$aws/things/+/shadow/update/accepted")
      }
    })

Keywords

mqtt

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts