# yoctotta-service-broker

> yoctotta-service-broker

Latest version **1.0.2** (published 2021-01-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install yoctotta-service-broker
pnpm add yoctotta-service-broker
yarn add yoctotta-service-broker
bun add yoctotta-service-broker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-05 |
| First published | 2021-01-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yspl |

## Links

- npm: https://www.npmjs.com/package/yoctotta-service-broker
- npm.io page: https://npm.io/package/yoctotta-service-broker

## Dependencies (5)

- [rxjs](https://npm.io/package/rxjs.md) ^6.6.3
- [uuidv4](https://npm.io/package/uuidv4.md) ^6.2.6
- [pubsub-js](https://npm.io/package/pubsub-js.md) ^1.8.1
- [node-cache](https://npm.io/package/node-cache.md) ^5.1.2
- [@types/pubsub-js](https://npm.io/package/@types/pubsub-js.md) ^1.8.1

## Recent versions

- 1.0.2 (latest) — 2021-01-05
- 1.0.1 — 2021-01-05
- 1.0.0 — 2021-01-05

## README

yoctotta-service-broker

Its a service broker that allows for registering services and using a Pub/Sub mechanism in node js.
E.G.

```
const broker = new LocalServiceBroker();

broker
        .bind(new LocalService("test"))
        .then(() => broker.get("test"))
        .then((service) => {
          service.transport.subscribe("testChannel", (msg) => {
            console.log(msg);
            resolve(msg);
          });
          service.transport
            .publish({
              messageId: "test1",
              channel: "testChannel",
              data: { msg: "Some Data" },
              msgTime: new Date(),
              msgType: "",
            })
            .then(
              () => console.log("Published"),
              (reason) => console.log(reason)
            );
        })
```

---
_Source: https://npm.io/package/yoctotta-service-broker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
