IMQOptions.cleanup property

Turns on/off the watcher's periodic removal of orphaned keys. Defaults to false.

Signature:

cleanup: boolean;

Remarks

This is a destructive sweep. Only the instance holding the watcher lock performs it, on the IMQOptions.safeDeliveryTtl interval, and it deletes every key under <prefix>:<cleanupFilter> that does not belong to a currently connected imq client — with one sweep of grace for clients seen during the previous sweep. That means it will delete messages queued for a consumer that is not running, so enable it only where queue names map one-to-one onto live processes.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.