1.1.3 • Published 5 years ago

@addapptables/bus v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Bus

Bus is a library for nodejs oriented to microservices

Example code

Getting Started

To get started, let's install the package through npm:

npm i @addapptables/bus --S

How to use

  • Import the module
import { rabbitmqCreateBus } from '@addapptables/bus';

const bus = rabbitmqCreateBus({ exchange:'nameExchange',  host: 'rabbitmqUrlHost'});

// publish
this.bus.publish('action', 'payload', 'context', 'opts');

//subscribe
this.bus.subscribe('action', () =>{
    console.log('action called')
}, 'context', 'opts')

//send
this.bus.send('queue', 'pyload', 'opts')

//close
this.bus.close()
1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago