Interface: HandlerConsumerOptions
TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.
Defined in: types.ts:317
Options for a handler-based consumer (Connection.consumeHandler). Extends ConsumerOptions with handler-specific settings.
Extends
Properties
autoExtension?
optionalautoExtension?:object
Defined in: types.ts:278
Auto-extension settings for visibility timeout
enabled
enabled:
boolean
Whether to automatically renew visibility. Default true. Reduces the risk of redelivery during work; it cannot guarantee exclusive execution.
extensionSec?
optionalextensionSec?:number
Deprecated
Ignored for scheduling, but still validated as a positive
integer when supplied. Auto-extension always re-extends by
visibilityTimeoutSec (matching the Go client) so the granted lease
and the next-extension schedule stay consistent.
extensionThreshold?
optionalextensionThreshold?:number
Fraction of the remaining visibility timeout that must elapse before
auto-extension fires, matching the Go client's WithExtensionThreshold.
Must be in (0, 1). Default 0.5 (extend at the halfway point). Lower
values extend earlier (more headroom, more DB calls); higher values
extend later (e.g. 0.9 = extend at 90% of the lease).
maxBatchSize?
optionalmaxBatchSize?:number
Deprecated
Ignored for batching, but still validated as a positive
integer when supplied. The extension batch cap is now a connection option
(ConnectionOptions.extenderBatchSize) because auto-extension is
connection-level — one actor batches across all consumers, so a
per-consumer cap is meaningless.
Inherited from
batchSize?
optionalbatchSize?:number
Defined in: types.ts:274
Maximum messages fetched per batch. Positive integer; default 10.
Inherited from
maxInFlight?
optionalmaxInFlight?:number
Defined in: types.ts:323
Maximum number of handler invocations running concurrently. 0 (the default) means unlimited — a handler is started as soon as a message is available. Mirrors the Go client's WithMaxInFlight.
pollingIntervalMs?
optionalpollingIntervalMs?:number
Defined in: types.ts:304
Polling interval when no messages or notifications are available. Positive integer in milliseconds; default 1000.
Inherited from
ConsumerOptions.pollingIntervalMs
topic?
optionaltopic?:string
Defined in: types.ts:310
Topic for the consumed queue. Supply it when this connection has not
cached the association through createQueue() or an explicit topic option.
There is no database lookup fallback. An uncached queue without this option
fails with a "topic unknown" Error when messages() starts the stream,
or immediately in consumeHandler().
Inherited from
visibilityTimeoutSec?
optionalvisibilityTimeoutSec?:number
Defined in: types.ts:276
Initial visibility timeout and automatic renewal duration in seconds. Nonnegative integer; default 30. Explicit 0 also selects 30 seconds.