Skip to content

RabbitMQ library for brokering messages between different system components

Notifications You must be signed in to change notification settings

TogetherCrew/broker-lib-ts

Repository files navigation

tc-messageBroker

Maintainability Test Coverage

RabbitMQ library written in TypeScript. Responsible for brokering messages between different services.

Install

npm i @togethercrew.dev/tc-messagebroker

Initial RabbitMQ in root directory

import RabbitMQ from '@togethercrew.dev/tc-messagebroker';

RabbitMQ.connect("connectionURL", "queueName").then(() => {
    console.log("RabbitMQ was connected!")
})

Push to the specific queue and event

import RabbitMQ from '@togethercrew.dev/tc-messagebroker';

RabbitMQ.publish("queueName", "eventName", { key: "value" })

Subscribe on specific event

import RabbitMQ from '@togethercrew.dev/tc-messagebroker';

RabbitMQ.onEvent("eventName", (msg) => {})

Ensure that the onEvent function is called when the application is launched

About

RabbitMQ library for brokering messages between different system components

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages