You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "imjyz (via GitHub)" <gi...@apache.org> on 2026/08/12 09:41:09 UTC
[PR] [java] Support receiving from specified topic (#1315) [rocketmq-clients]
imjyz opened a new pull request, #1333:
URL: https://github.com/apache/rocketmq-clients/pull/1333
### Which Issue(s) This PR Fixes
Related to apache/rocketmq-clients#1315
### Brief Description
Add synchronous and asynchronous `SimpleConsumer.receive` overloads that accept a topic selected from the current subscriptions.
The existing receive APIs remain unchanged and continue to select across all subscribed topics. The new overloads reuse the subscribed filter expression and fail with `IllegalArgumentException` when the requested topic is not currently subscribed.
This PR implements topic-aware receive only. Queue-aware receive and exposing topic route data remain outside this change.
### How Did You Test This Change?
- Added tests for receiving from a specified subscribed topic.
- Added tests for unsubscribed topics, topics removed by `unsubscribe`, and consumers that are not running.
- Ran `SimpleConsumerImplTest`: 11 tests passed with no failures.
- Verified the Java API/client modules compile and pass Checkstyle and SpotBugs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [java] Support receiving from specified topic (#1315) [rocketmq-clients]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1333:
URL: https://github.com/apache/rocketmq-clients/pull/1333#issuecomment-5265338386
## [Codecov](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `72.22222%` with `5 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 63.24%. Comparing base ([`4076e2b`](https://app.codecov.io/gh/apache/rocketmq-clients/commit/4076e2b1d9979079c228aa52bfc8fa6dd874fa3b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`397283b`](https://app.codecov.io/gh/apache/rocketmq-clients/commit/397283bf7412f5a53fb4712a368864b959440543?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 161 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../client/java/impl/consumer/SimpleConsumerImpl.java](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333?src=pr&el=tree&filepath=java%2Fclient%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Fjava%2Fimpl%2Fconsumer%2FSimpleConsumerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-amF2YS9jbGllbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL2NsaWVudC9qYXZhL2ltcGwvY29uc3VtZXIvU2ltcGxlQ29uc3VtZXJJbXBsLmphdmE=) | 72.22% | [4 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1333 +/- ##
============================================
+ Coverage 53.26% 63.24% +9.97%
- Complexity 651 834 +183
============================================
Files 208 108 -100
Lines 14303 4650 -9653
Branches 5845 364 -5481
============================================
- Hits 7619 2941 -4678
+ Misses 6308 1508 -4800
+ Partials 376 201 -175
```
| [Flag](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [cpp](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [golang](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.24% <72.22%> (+1.56%)` | :arrow_up: |
| [rust](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq-clients/pull/1333?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [java] Support receiving from specified topic (#1315) [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #1333: [java] Support receiving from specified topic (#1315)
URL: https://github.com/apache/rocketmq-clients/pull/1333
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [java] Support receiving from specified topic (#1315) [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1333:
URL: https://github.com/apache/rocketmq-clients/pull/1333#issuecomment-5975332988
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [java] Support receiving from specified topic (#1315) [rocketmq-clients]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1333:
URL: https://github.com/apache/rocketmq-clients/pull/1333#issuecomment-6049818188
This PR was closed because it has been inactive for 3 days since being marked as stale.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org