aux-broker-mq
TypeScript icon, indicating that this package has built-in type declarations

1.0.15 • Public • Published

Вспомогательный прокси для взаимодействия с очередью сообщений

Как подключить

import { BrokerProxy } from "./dist/BrokerProxy";
const broker = new BrokerProxy({ host: "guest:guest@localhost" });
// ... async context {
    await broker.connect();
    await broker.createChannel("test");
// }

Как работать

Отправка сообщений

 broker.emit("testService.Update", { value: Object });

Получение сообщений

interface Event {
    value: Object
}
broker.on<Event>("testService.Update").subscribe((msg: Event) => {
     
});

Readme

Keywords

Package Sidebar

Install

npm i aux-broker-mq

Weekly Downloads

2

Version

1.0.15

License

MSI

Unpacked Size

37.7 kB

Total Files

20

Last publish

Collaborators

  • pikada-lab