1.0.2 • Published 3 years ago

yoctotta-service-broker v1.0.2

Weekly downloads
13
License
ISC
Repository
-
Last release
3 years ago

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)
            );
        })
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago