@yourrentals/cloudevent-publisher-hapi
TypeScript icon, indicating that this package has built-in type declarations

0.7.2 • Public • Published

@yourrentals/cloudevent-publisher-hapi

This library defines a JS library to publish messages to the message bus.

Installation

yarn add @yourrentals/cloudevent-publisher-hapi

Usage

import { Publisher } from '@yourrentals/cloudevent-publisher-hapi';

const publisher = new Publisher({
  source: 'publisher',
  topics: [
    {
      eventType: 'my-event',
      topicArn: 'arn:aws:sns:eu-west-1:123456789012:my-topic',
    },
  ],
});

await publisher.publish('my-event', {
  data: {
    foo: 'bar',
  },
});

await publisher.publishBatch('my-event', [
  {
    data: {
      foo: 'bar',
    },
  },
]);

Readme

Keywords

none

Package Sidebar

Install

npm i @yourrentals/cloudevent-publisher-hapi

Weekly Downloads

18

Version

0.7.2

License

none

Unpacked Size

1.41 kB

Total Files

6

Last publish

Collaborators

  • npm.your.rentals
  • kien.nguyen.yr
  • ondrejkousal