pp-event-bus
TypeScript icon, indicating that this package has built-in type declarations

0.0.30 • Public • Published

eventBus

Small library and microservice form rabbitmq-based event bus.

Usage

npm i --save pp-event-bus - install library npm start - run eventBus microservice

Environment variables

  • EVENT_BUS_LOG - path to directory where event logs will be stored; if not set, event logs will not be stored
  • EVENT_BUS_QUEUE - default: localdev.eventbus
  • RABBITMQ_URL - default: amqp://guest:guest@127.0.0.1/

Examples

Sample:

  • consumer: src/examples/consumer.js
  • producer: src/examples/producer.js

To see them in action, run

  • npm run build to build project
  • npm start to run eventBus microservice
  • npm run consumer to run example consumer
  • npm run producer to run example producer

To run rabbitMQ in docker locally run:

/pp-event-bus/

    Package Sidebar

    Install

    npm i pp-event-bus

    Weekly Downloads

    50

    Version

    0.0.30

    License

    MIT

    Unpacked Size

    44.8 kB

    Total Files

    53

    Last publish

    Collaborators

    • polskiepolisy