1.0.0 • Published 1 year ago
@mysa/publish-cbm-to-sns v1.0.0
@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);
}
1.0.0
1 year ago