Skip to content
English

BoundedMailboxOptionsBuilder

Defined in: src/mailbox/BoundedMailboxOptions.ts:59

Fluent builder for BoundedMailboxOptionsType:

new BoundedMailbox(BoundedMailboxOptions.create()
.withCapacity(1000)
.withOverflow('drop-head'));

new BoundedMailboxOptionsBuilder(): BoundedMailboxOptionsBuilder

BoundedMailboxOptionsBuilder

OptionsBuilder.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

OptionsBuilder.build


withCapacity(capacity): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:66

Maximum queued user messages. Must be >= 1.

number

this


withDeadLetterDrops(deadLetterDrops): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:81

Dead-letter each dropped envelope instead of only counting it. Default false.

boolean

this


withOnDrop(onDrop): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:76

Hook fired on each overflow drop, with the envelope it discarded.

MailboxDropObserver

this


withOverflow(overflow): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:71

What to do when a message arrives on a full mailbox. Default reject.

BoundedMailboxOverflow

this


static create(): BoundedMailboxOptionsBuilder

Defined in: src/mailbox/BoundedMailboxOptions.ts:61

Start a fresh builder.

BoundedMailboxOptionsBuilder