Skip to main content

Message Fanout

Prerequisites

Installation

npm i @winglibs/messagefanout

Usage

bring messagefanout;

let fanout = new messagefanout.MessageFanout();

fanout.addConsumer(inflight (msg: str) => {
log("Hello {msg}!!!");
});

test "push a message to fanout" {
fanout.publish("world");
}

License

This library is licensed under the MIT License.

API Reference

Table of Contents

MessageFanout (preflight class)

No description

Constructor

new(): MessageFanout

Properties

No properties

Methods

SignatureDescription
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): voidNo description
inflight publish(message: str): voidNo description

platform.MessageFanout_tfaws (preflight class)

No description

Constructor

new(): MessageFanout_tfaws

Properties

No properties

Methods

SignatureDescription
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): voidNo description
inflight publish(message: str): voidNo description

platform.MessageFanout_sim (preflight class)

No description

Constructor

new(): MessageFanout_sim

Properties

No properties

Methods

SignatureDescription
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): voidNo description
inflight publish(message: str): voidNo description

commons.IMessageFanout (interface)

No description

Properties

NameTypeDescription
nodeNodeThe tree node.

Methods

SignatureDescription
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): voidNo description
inflight publish(message: str): voidNo description

commons.MessageFanoutProps (struct)

No description

Properties

NameTypeDescription
dlqDeadLetterQueueProps?A dead-letter queue.
namestrNo description
retentionPeriodduration?How long a queue retains a message.
timeoutduration?How long a queue's consumers have to process a message.