1.0.0 • Published 2 years ago

@mysa/publish-cbm-to-sns v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

@mysa/publish-cbm-to-sns

This package contains a couple of functions that can be used to publish a CBM to an SNS topic. It is primarily intended for sending new types of traffic to the message bus service.

Usage

Add this package to your dependencies, and then you can use it by importing the package:

import { prepareAndPublishCbm } from '@mysa/publish-cbm-to-sns';

It can be used like so:

  try {
    await prepareAndPublishCbm(msg, DetailTypes.IOT_SETPOINT_CHANGES, process.env['MESSAGE_BUS_ENTRY_TOPIC_ARN']);
  }
  catch (err) {
    console.error("Error occurred while trying to publish setpoint CBM: ", err);
  }