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
- Classes
- Interfaces
- Structs
MessageFanout (preflight class)
No description
Constructor
new(): MessageFanout
Properties
No properties
Methods
Signature | Description |
---|---|
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): void | No description |
inflight publish(message: str): void | No description |
platform.MessageFanout_tfaws (preflight class)
No description
Constructor
new(): MessageFanout_tfaws
Properties
No properties
Methods
Signature | Description |
---|---|
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): void | No description |
inflight publish(message: str): void | No description |
platform.MessageFanout_sim (preflight class)
No description
Constructor
new(): MessageFanout_sim
Properties
No properties
Methods
Signature | Description |
---|---|
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): void | No description |
inflight publish(message: str): void | No description |
commons.IMessageFanout (interface)
No description
Properties
Name | Type | Description |
---|---|---|
node | Node | The tree node. |
Methods
Signature | Description |
---|---|
addConsumer(handler: inflight (str): void, props: MessageFanoutProps): void | No description |
inflight publish(message: str): void | No description |
commons.MessageFanoutProps (struct)
No description
Properties
Name | Type | Description |
---|---|---|
dlq | DeadLetterQueueProps? | A dead-letter queue. |
name | str | No description |
retentionPeriod | duration? | How long a queue retains a message. |
timeout | duration? | How long a queue's consumers have to process a message. |