method Deno.Kv.prototype.listenQueue
Kv.prototype.listenQueue(handler: (value: any) => Promise<void> | void): Promise<void>
Listen for queue values to be delivered from the database queue, which
were enqueued with Deno.Kv.enqueue
. The provided handler
callback is invoked on every dequeued value. A failed callback
invocation is automatically retried multiple times until it succeeds
or until the maximum number of retries is reached.
const db = await Deno.openKv(); db.listenQueue(async (msg: unknown) => { await db.set(["foo"], msg); });
Promise<void>