0.0.7 • Published 4 years ago

@coding-blocks/whisperer v0.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Whisperer

An event sourcing over AMQP library using STOMP.

Getting Started

  • Whisperer uses AMQP backends with STOMP plugin such as RabbitMQ
  • Enable STOMP plugin in RabbitMQ using rabbitmq-plugins enable rabbitmq_stomp
  • Enable STOMP web plugin in RabbitMQ to enable websocket interation rabbitmq-plugins enable rabbitmq_web_stomp

Installation

  • If using npm npm install @coding-blocks/whisperer
  • If using yarn yarn add @coding-blocks/whisperer

Usage

  • Create a whisperer object
import Whisperer from "@coding-blocks/whisperer";

const whisperer = new Whisperer({
  host: '127.0.0.1',
  port: 15674,
  username: 'guest',
  password: 'guest'
});

await whisperer.init()
  • To Subscribe to topics
  whisperer.on('oneauth_user.created', (msg, frame) => {
    console.log("listener 2: <created>", msg)
    frame.ack()
  })
  • To emit messages
  whisperer.emit('oneauth_user.created', {
    body: {
      data: 'some create message'
    }
  })
0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago