Skip to content

Initial implementation of pull consumer#501

Open
aaron-ai wants to merge 1 commit into
apache:masterfrom
aaron-ai:pull
Open

Initial implementation of pull consumer#501
aaron-ai wants to merge 1 commit into
apache:masterfrom
aaron-ai:pull

Conversation

@aaron-ai

@aaron-ai aaron-ai commented Apr 24, 2023

Copy link
Copy Markdown
Member

Fixes #500

@aaron-ai aaron-ai marked this pull request as draft April 24, 2023 07:46
@codecov-commenter

codecov-commenter commented Apr 24, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.94131% with 443 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.26%. Comparing base (cea5343) to head (d169597).
⚠️ Report is 216 commits behind head on master.

Files with missing lines Patch % Lines
...mq/client/java/impl/consumer/PullConsumerImpl.java 61.09% 96 Missing and 18 partials ⚠️
...mq/client/java/misc/CustomLinkedBlockingQueue.java 2.72% 107 Missing ⚠️
...lient/java/impl/consumer/PullProcessQueueImpl.java 60.86% 65 Missing and 7 partials ⚠️
...cketmq/client/java/impl/consumer/ConsumerImpl.java 19.11% 55 Missing ⚠️
...t/java/impl/consumer/PullMessageQueuesScanner.java 60.71% 17 Missing and 5 partials ⚠️
...t/java/impl/consumer/PullSubscriptionSettings.java 29.41% 12 Missing ⚠️
...ketmq/client/java/misc/CacheBlockingListQueue.java 78.94% 6 Missing and 6 partials ⚠️
...e/rocketmq/client/java/impl/ClientManagerImpl.java 75.75% 8 Missing ⚠️
...q/client/java/impl/consumer/BatchMessageViews.java 0.00% 7 Missing ⚠️
...apache/rocketmq/client/java/rpc/RpcClientImpl.java 68.18% 7 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #501      +/-   ##
============================================
+ Coverage     45.94%   46.26%   +0.31%     
- Complexity      667      770     +103     
============================================
  Files           207      217      +10     
  Lines         11503    12388     +885     
  Branches       2933     3045     +112     
============================================
+ Hits           5285     5731     +446     
- Misses         5988     6386     +398     
- Partials        230      271      +41     
Flag Coverage Δ
java 60.55% <50.94%> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@aaron-ai aaron-ai force-pushed the pull branch 7 times, most recently from 05bbd26 to 3da0034 Compare April 28, 2023 07:44
@aaron-ai aaron-ai force-pushed the pull branch 2 times, most recently from 8f8716c to 8ec4d48 Compare May 15, 2023 11:27
@aaron-ai aaron-ai force-pushed the pull branch 6 times, most recently from 70ad82e to 6900624 Compare June 14, 2023 06:11
@aaron-ai aaron-ai marked this pull request as ready for review June 14, 2023 06:13
@aaron-ai aaron-ai changed the title Implement pull consumer for java Initial implementation of pull consumer Jun 30, 2023
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.

@github-actions github-actions Bot added the stale Pull request is stale label Jul 31, 2023
@aaron-ai aaron-ai added no stale This will never be considered stale and removed stale Pull request is stale labels Jul 31, 2023

@oss-sentinel-ai oss-sentinel-ai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review: Approved ✅

PR: #501 — Initial implementation of pull consumer
Type: Feature implementation (many files, +3934/-157)

Assessment

This is a major feature PR implementing the Pull Consumer API for the Java client. It provides a new consumption model similar to LitePullConsumer in RocketMQ 4.0, offering higher controllability and flexibility.

Key Changes

  • New PullConsumer and PullConsumerBuilder APIs
  • TopicMessageQueueChangeListener for queue change notifications
  • MessageQueue abstraction
  • Session credentials support
  • Comprehensive implementation across client modules

Verdict

✅ Well-structured implementation of a significant feature. Fixes #500.


🤖 Automated review by oss-sentinel-ai

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by github-manager-bot

Summary

Initial implementation of a Pull Consumer for the Java client, adding PullConsumerImpl, PullProcessQueue, PullMessageQueuesScanner, and supporting infrastructure. This is a significant feature addition (~3,900 lines) implementing issue #500.

Findings

  • [Warning] PR Age: This PR has been open since April 2023 (~3 years). The codebase has likely evolved significantly since then. A rebase and compatibility check with the current develop branch is essential before any merge consideration.

  • [Warning] Scope: The PR includes a new consumer type (PullConsumer), custom queue implementations (CustomLinkedBlockingQueue at 1,117 lines, CacheBlockingListQueue at 175 lines), and modifications to existing consumer code. This is a large feature that needs careful review.

  • [Info] The PR includes comprehensive test coverage (PullConsumerImplTest, PullProcessQueueImplTest, etc.), which is good.

  • [Warning] CustomLinkedBlockingQueue.java — A custom 1,117-line queue implementation is a significant maintenance burden. Consider whether java.util.concurrent primitives could be composed to achieve the same behavior.

Suggestions

  1. Rebase required — the PR is 3 years old and likely has significant merge conflicts.
  2. Consider splitting the custom queue implementations into a separate PR for independent review.
  3. Verify that the Pull Consumer API design is consistent with the Go/C++ client implementations.
  4. A maintainer should assess whether Pull Consumer is still a desired feature given the age of this PR.

Automated review by github-manager-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no stale This will never be considered stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement pull consumer for java

4 participants