Interface: ConsumerOptions
TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.
Defined in: types.ts:272
Options for consuming messages
Extended by
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.
batchSize?
optionalbatchSize?:number
Defined in: types.ts:274
Maximum messages fetched per batch. Positive integer; default 10.
pollingIntervalMs?
optionalpollingIntervalMs?:number
Defined in: types.ts:304
Polling interval when no messages or notifications are available. Positive integer in milliseconds; default 1000.
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().
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.