Skip to content

rabbitmq - feat: adding in tasks#168

Merged
jaredwray merged 13 commits intomainfrom
rabbitmq---feat-adding-in-tasks
Feb 12, 2026
Merged

rabbitmq - feat: adding in tasks#168
jaredwray merged 13 commits intomainfrom
rabbitmq---feat-adding-in-tasks

Conversation

@jaredwray
Copy link
Owner

@jaredwray jaredwray commented Feb 12, 2026

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
rabbitmq - feat: adding in tasks

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ed8144012

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jaredwray, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the RabbitMQ package by integrating a dedicated task management system. It provides a robust and reliable way to handle asynchronous operations, ensuring tasks are processed, retried if necessary, and moved to dead-letter queues upon persistent failure. This feature allows for more complex and resilient background processing workflows within applications utilizing RabbitMQ.

Highlights

  • New RabbitMQ Task Provider: Introduced a new RabbitMqTaskProvider class to manage tasks using RabbitMQ, offering robust features for reliable task processing.
  • Task Management Features: Implemented core task management functionalities including enqueueing, dequeuing, automatic retries, dead-letter queues, and handling of scheduled tasks.
  • Event Emission and Reconnection: The task provider extends Hookified for event emission (e.g., errors) and includes logic for automatic reconnection to RabbitMQ with configurable delays.
  • Comprehensive Testing: Added extensive unit tests for the RabbitMqTaskProvider to ensure reliability and correct behavior across various scenarios, including error handling, timeouts, and scheduled tasks.
Changelog
  • packages/rabbitmq/package.json
    • Added 'hookified' as a new dependency for event emission capabilities.
  • packages/rabbitmq/src/index.ts
    • Exported new task-related constants and the 'RabbitMqTaskProvider' class from 'task.js'.
  • packages/rabbitmq/src/task.ts
    • Added the 'RabbitMqTaskProvider' class, implementing task enqueueing, dequeuing, retry logic, dead-letter queue management, and scheduled task handling.
    • Included connection management with automatic reconnection and graceful disconnection.
    • Provided methods for retrieving queue statistics and clearing queue data.
  • packages/rabbitmq/test/task.test.ts
    • Added comprehensive test suite for the 'RabbitMqTaskProvider' covering initialization, enqueue/dequeue operations, task acknowledgment, rejection, retries, timeouts, scheduled tasks, and edge cases.
  • pnpm-lock.yaml
    • Updated pnpm lockfile to include the new 'hookified' dependency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new RabbitMqTaskProvider for handling task queues, complete with features like retries, dead-lettering, and scheduled tasks. However, several Denial of Service (DoS) vulnerabilities were identified, stemming from improper error handling of malformed messages, protocol violations with multiple handlers, and potential memory exhaustion due to unbounded in-memory state tracking. Furthermore, a critical issue regarding potential message loss during task rejection was found, and the in-memory tracking of scheduled tasks and dead-letter queues presents a risk of data loss on application crashes. Addressing these points will enhance the provider's reliability and security.

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (91cd837) to head (5886ae0).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #168    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            8         9     +1     
  Lines          806      1067   +261     
  Branches       166       215    +49     
==========================================
+ Hits           806      1067   +261     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9c0cee714

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jaredwray
Copy link
Owner Author

@gemini-code-assist please review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a new RabbitMqTaskProvider which significantly enhances the task queuing capabilities with features like retries, timeouts, and dead-letter queues. The implementation in packages/rabbitmq/src/task.ts appears robust, including comprehensive error handling, reconnection logic, and proper management of task lifecycle. The README.md has been updated to clearly document the new provider and its usage, which is excellent for user adoption. However, a notable change is the removal of the scheduledAt property and its associated logic from the Task type, MemoryTaskProvider, and RedisTaskProvider. While this simplifies the task model, it represents a functional change that should be explicitly highlighted in the PR description. Additionally, critical tests for task-specific timeouts and retry attempt increments were removed from packages/redis/test/task.test.ts, which could lead to a gap in test coverage for the Redis provider's core functionality.

@jaredwray jaredwray merged commit 2150283 into main Feb 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant