Interface MessageQueue<Message>

Handles delivery of a sequence of sent Messages - which can be any javascript value - for one or more receivers to process by calling ().

interface MessageQueue<Message> {
    receive: (() => Promise<Message>);
    send: ((message) => boolean);
}

Type Parameters

  • Message

Properties

Properties

receive: (() => Promise<Message>)

Takes a message from the message backlog or waits for the next () call if there is no backlog.

Type declaration

send: ((message) => boolean)

Delivers message to any waiting () call or adds to a backlog for a future caller to receive.

Type declaration

    • (message): boolean
    • Parameters

      Returns boolean