Repository navigation
fix(api): recover NuQ RabbitMQ listeners after subscription failures - #5923
Open
JasonOA888 wants to merge 4 commits into
Open
JasonOA888 wants to merge 4 commits into
JasonOA888 wants to merge 4 commits into
Conversation
Continue firecrawl#4263 against current main and verify subscription recovery with RabbitMQ and Postgres. Co-authored-by: edenbuilds <[email protected]> Co-authored-by: omkar1work <[email protected]>
devin-ai-integration
Bot
force-pushed
the
devin/1795181912-nuq-rabbitmq-listener
branch
from
November 20, 2026 14:06
a309840 to
749450a
Compare
2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4244. NuQ now waits for RabbitMQ to accept the consumer before making the listener available to job waiters. Concurrent waiters share the same startup attempt. If setup fails, NuQ closes the partial channel and connection, reports the original error, and lets the next waiter retry.
Deliveries are acknowledged on the channel that received them, including messages delivered immediately after registration. When the broker cancels an established consumer, NuQ closes the old connection before reconnecting and checks PostgreSQL for completions that arrived while disconnected.
Continues #4263 against current
main. Thanks to @edenbuilds and @omkar1work for the original fix and cleanup work.Testing
main. All seven listener tests pass with the fix, covering retry, concurrent waiters, cancellation, startup shutdown, and timeouts.pnpm harness pnpm exec vitest run src/__tests__/nuq-postgres.test.tspassed all three tests, including an actual broker rejection followed by a PostgreSQL-backed job completion delivered through RabbitMQ. The harness also built the API.pnpm test:corehad 1,152 passes, 26 skips, and one unrelated HTML-to-Markdown list-formatting failure, reproduced separately on unmodifiedmain.Summary by cubic
NuQ RabbitMQ listeners now wait for the broker to accept the consumer before becoming available to job waiters, wait for listener shutdown to finish, and recover when subscriptions or reconnects fail.
Bug Fixes
consume()resumes.Written for commit 4ea8d53. Summary will update on new commits.