0.0.6 • Published 3 years ago

@bestcodetools/message-io v0.0.6

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

@bestcodetools/message-io

pipeline coverage

How to Install

npm install @bestcodetools/message-io

Usage with TypeScript

For publishing

import { Factory } from '@bestcodetools/message-io';

const publisher = Factory.create();

const topicArn = 'arn:aws:sns:us-east-1:000000000000:my-tpoic';

const payload = { message: 'Hello!' };

publisher.publish(topicArn, payload);

For handling published messages

import { AwsCommandFactoryAdapterHandler } from '@bestcodetools/message-io';

class Command {
  execute(data: any, context: any) {
    console.log('Data:',data,'Context:', context);
  }
}

class CommandFactory {
  create() {
    return new Command();
  }
}

export default AwsCommandFactoryAdapterHandler(CommandFactory);
0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago