bunqueue v2.8.35
blog · release
bunqueue v2.8.35
Fixes 5 bugs and ships 3 additions. New Async variants on Queue that resolve only after the server has processed the command: obliterateAsync(), pauseAsync(), resumeAsync(), drainAsync() (returns the removed count), retryDlqAsync(id?) and…
To install bunqueue v2.8.35
Section titled “To install bunqueue v2.8.35”bun add bunqueue@2.8.35npm install bunqueue@2.8.35To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestWhat’s new
Section titled “What’s new”- New
Asyncvariants onQueuethat resolve only after the server has processed the command:obliterateAsync(),pauseAsync(),resumeAsync(),drainAsync()(returns the removed count),retryDlqAsync(id?)andpurgeDlqAsync()(return the server count the fire-and-forget forms discard),setStallConfigAsync(),setDlqConfigAsync(),setGlobalRateLimitAsync(),removeGlobalRateLimitAsync(),setGlobalConcurrencyAsync(),removeGlobalConcurrencyAsync(). getDlqJobsAsync(count?)lists a remote server’s dead jobs over TCP via the existingDlqcommand (plain Job objects; DLQ metadata such as the failure reason stays embedded-only).- Why: fire-and-forget commands travel over a 4-connection pool with no
ordering guarantee, so
obliterate()followed byadd()could wipe the new job. The awaitable forms close that race; two TCP test suites were flaky for exactly this reason and now use them.
Bugfixes
Section titled “Bugfixes”queue.setGlobalRateLimit(max, duration?)now means “maxjobs perdurationms” in both embedded and TCP modes (default stays 1 second). TheRateLimitwire command andPUT /queues/:queue/rate-limitgain optionalduration; invalid values degrade to the defaults instead of failing.- Previously the client accepted
durationfor BullMQ compatibility and silently dropped it: “100 per minute” behaved as “100 per second”.
Bugfixes
Section titled “Bugfixes”queue.rateLimit(expireTimeMs)now sets the limit with a broker-sidettl: the server clears it by itself, lazily, in embedded and TCP mode alike. Previously the expiry was a client-side timer in embedded mode and never happened over TCP (the “temporary” limit was permanent). Invalid input now throws. TTL’d limits persist across restarts with their remaining time and never resurrect once expired (schema migrations 15-16 addqueue_state.rate_limit_duration/rate_limit_expires_at, one column per migration so interrupted upgrades heal on retry).
Bugfixes
Section titled “Bugfixes”- The scheduler incremented and persisted
executionsbefore the skip checks (skipIfNoWorker, overlap guard), so a skipped fire burned one run of the cap without pushing a job — askipIfNoWorkercron with no worker could exhaust its entire budget with zero deliveries. Skip decisions now run before the increment: a skip advances the schedule and emitscron:skippedbut leaves the budget untouched, soexecutionscounts actual deliveries.
Bugfixes
Section titled “Bugfixes”test-flow-advancedandtest-frameparser-pipelining-e2eraced their fire-and-forgetobliterate()against the jobs they pushed right after (the CI failures on July 17); both now awaitobliterateAsync(). The 20k-row recovery regression test gained an explicit timeout for slow CI runners.
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.34 · Release on GitHub · Commits since v2.8.32 · Full changelog · All posts