Class: MllpBackpressureError
Thrown (or rejects the send() promise) when the in-flight queue exceeds
the configured high-water mark and onBackpressure: 'reject' is set.
highWaterMark accepts a count cap, a byte cap, or both, when both are
present, the stricter-of-two trigger wins.
Example
try {
await client.send(payload);
} catch (err) {
if (err instanceof MllpBackpressureError) {
logger.warn({
queueDepth: err.queueDepth,
queueBytes: err.queueBytes,
cap: err.highWaterMark,
});
}
}
Extends
Error
Constructors
Constructor
new MllpBackpressureError(
message,opts):MllpBackpressureError
Construct an MLLP backpressure error.
Parameters
message
string
Human-readable error message.
opts
Backpressure context (queue depth, queued bytes, the high-water-mark hit).
highWaterMark
{ bytes?: number; count?: number; }
highWaterMark.bytes?
number
highWaterMark.count?
number
queueBytes
number
queueDepth
number
Returns
MllpBackpressureError
Overrides
Error.constructor
Properties
highWaterMark
readonlyhighWaterMark:object
The high-water-mark configuration that was triggered.
bytes?
readonlyoptionalbytes?:number
count?
readonlyoptionalcount?:number
name
readonlyname:"MllpBackpressureError"
Overrides
Error.name
queueBytes
readonlyqueueBytes:number
Total bytes of in-flight + queued frames at the moment of rejection.
queueDepth
readonlyqueueDepth:number
Number of in-flight + queued sends at the moment of rejection.