Interfaces · @purista/core
QueueBridge
Queue transport adapter contract used by PURISTA services and queue workers.
Signature
interface QueueBridge Properties
3 entries
capabilities
Property
capabilities: QueueBridgeCapabilities Runtime capability matrix used for strict queue validation.
instanceId
Property
instanceId: string Stable runtime instance id used to distinguish bridge processes.
name
Property
name: string Human-readable adapter name used in diagnostics, logs, and metrics.
Methods
15 entries
ack
Method
ack(queueName: string, leaseId: string): Promise<void> Acknowledge successful processing and remove the leased message.
destroy
Method
destroy(): Promise<void> Release provider resources and stop background bridge activity.
enqueue
Method
enqueue(options: QueueEnqueueOptions<unknown, unknown>): Promise<QueueEnqueueResult> Enqueue a queue message and return provider-visible job metadata.
extendLease
Method
extendLease(queueName: string, leaseId: string, extensionMs: number): Promise<void> Extend an active lease so long-running work can continue safely.
inspectLeases
Method
inspectLeases(queueName: string, options?: QueueDeadLetterListOptions): Promise<QueueLeaseInspectionRecord[]> Inspect active leases when the adapter supports lease diagnostics.
isHealthy
Method
isHealthy(): Promise<boolean> Returns whether the bridge can currently make progress.
isReady
Method
isReady(): Promise<boolean> Returns whether the bridge has completed startup and can accept calls.
leaseNext
Method
leaseNext(queueName: string, options?: QueueLeaseOptions): Promise<QueueLease | undefined> Lease the next available message for a worker, if one is ready.
metrics
Method
metrics(queueName: string): Promise<QueueMetrics> Return queue-level operational metrics for health and dashboards.
moveToDeadLetter
Method
moveToDeadLetter(queueName: string, message: QueueMessage, reason?: string): Promise<void> Move a message to the dead-letter store with an optional safe reason.
nack
Method
nack(queueName: string, leaseId: string, request: QueueRetryRequest): Promise<void> Return a leased message to the queue or move it toward dead-letter policy.
peekDeadLetter
Method
peekDeadLetter(queueName: string, options?: QueueDeadLetterListOptions): Promise<QueueMessage[]> Inspect dead-letter messages without redriving or deleting them.
purgeDeadLetter
Method
purgeDeadLetter(queueName: string): Promise<number> Delete all dead-letter messages for the queue.
redriveDeadLetter
Method
redriveDeadLetter(queueName: string, options?: QueueDeadLetterRedriveOptions): Promise<number> Move dead-letter messages back to the live queue.
start
Method
start(): Promise<void> Start the bridge and establish any provider connection needed for work.