You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/13 15:05:46 UTC

[GitHub] [rocketmq] sunxiaojian opened a new pull request, #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

sunxiaojian opened a new pull request, #4820:
URL: https://github.com/apache/rocketmq/pull/4820

   In the subscribe mode
   
   -  Friendly support for customized MessageQueueListener, and can use the seek method
   -  you can specify the offset that the MessageQueue will commit 
   -  Provides a method to get the assigned MessageQueue


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] ShannonDing commented on a diff in pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
ShannonDing commented on code in PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#discussion_r953288359


##########
client/src/main/java/org/apache/rocketmq/client/consumer/LitePullConsumer.java:
##########
@@ -170,6 +187,12 @@ public interface LitePullConsumer {
      */
     void commitSync();
 
+    /**
+     * Offset specified by batch commit
+     * @param messageQueues
+     * @param persist
+     */
+    void commitSync(Map<MessageQueue, Long> messageQueues, boolean persist);

Review Comment:
   The first para seems offsets map, not messageQueues.



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] sunxiaojian commented on a diff in pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
sunxiaojian commented on code in PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#discussion_r953292604


##########
client/src/main/java/org/apache/rocketmq/client/consumer/LitePullConsumer.java:
##########
@@ -170,6 +187,12 @@ public interface LitePullConsumer {
      */
     void commitSync();
 
+    /**
+     * Offset specified by batch commit
+     * @param messageQueues
+     * @param persist
+     */
+    void commitSync(Map<MessageQueue, Long> messageQueues, boolean persist);

Review Comment:
   done



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] codecov-commenter commented on pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#issuecomment-1214181286

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4820?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#4820](https://codecov.io/gh/apache/rocketmq/pull/4820?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (95d7648) into [develop](https://codecov.io/gh/apache/rocketmq/commit/e5a71bb95f6b8c1dcb4e44d5948469629da3833b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5a71bb) will **decrease** coverage by `0.05%`.
   > The diff coverage is `68.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4820      +/-   ##
   =============================================
   - Coverage      44.94%   44.88%   -0.06%     
   + Complexity      7642     7623      -19     
   =============================================
     Files            980      980              
     Lines          68135    68177      +42     
     Branches        9014     9019       +5     
   =============================================
   - Hits           30621    30599      -22     
   - Misses         33732    33771      +39     
   - Partials        3782     3807      +25     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4820?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ent/impl/consumer/DefaultLitePullConsumerImpl.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9EZWZhdWx0TGl0ZVB1bGxDb25zdW1lckltcGwuamF2YQ==) | `69.68% <64.44%> (-0.14%)` | :arrow_down: |
   | [...ketmq/client/consumer/DefaultLitePullConsumer.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvRGVmYXVsdExpdGVQdWxsQ29uc3VtZXIuamF2YQ==) | `77.19% <100.00%> (+0.68%)` | :arrow_up: |
   | [...q/namesrv/routeinfo/BrokerHousekeepingService.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vQnJva2VySG91c2VrZWVwaW5nU2VydmljZS5qYXZh) | `72.72% <0.00%> (-9.10%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/logging/inner/SysLogger.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9TeXNMb2dnZXIuamF2YQ==) | `28.57% <0.00%> (-5.72%)` | :arrow_down: |
   | [...etmq/namesrv/routeinfo/BatchUnRegisterService.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vQmF0Y2hVblJlZ2lzdGVyU2VydmljZS5qYXZh) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...java/org/apache/rocketmq/logging/inner/Logger.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9Mb2dnZXIuamF2YQ==) | `51.67% <0.00%> (-4.31%)` | :arrow_down: |
   | [...lient/impl/consumer/DefaultMQPushConsumerImpl.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9EZWZhdWx0TVFQdXNoQ29uc3VtZXJJbXBsLmphdmE=) | `31.64% <0.00%> (-3.77%)` | :arrow_down: |
   | [...etmq/namesrv/processor/ClientRequestProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9wcm9jZXNzb3IvQ2xpZW50UmVxdWVzdFByb2Nlc3Nvci5qYXZh) | `70.37% <0.00%> (-3.71%)` | :arrow_down: |
   | [...ava/org/apache/rocketmq/test/util/VerifyUtils.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL1ZlcmlmeVV0aWxzLmphdmE=) | `46.26% <0.00%> (-2.99%)` | :arrow_down: |
   | [...q/controller/impl/manager/ReplicasInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY29udHJvbGxlci9pbXBsL21hbmFnZXIvUmVwbGljYXNJbmZvTWFuYWdlci5qYXZh) | `63.15% <0.00%> (-2.43%)` | :arrow_down: |
   | ... and [22 more](https://codecov.io/gh/apache/rocketmq/pull/4820/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] tsunghanjacktsai commented on pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
tsunghanjacktsai commented on PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#issuecomment-1216081826

   Link issue: #4805 


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] odbozhou commented on a diff in pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
odbozhou commented on code in PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#discussion_r953259885


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:
##########
@@ -474,6 +478,41 @@ private void updateTopicSubscribeInfoWhenSubscriptionChanged() {
         }
     }
 
+    /**
+     * subscribe data by customizing messageQueueListener
+     * @param topic
+     * @param subExpression
+     * @param messageQueueListener
+     * @throws MQClientException
+     */
+    public synchronized void subscribe(String topic, String subExpression, MessageQueueListener messageQueueListener) throws MQClientException {
+        try {
+            if (topic == null || "".equals(topic)) {

Review Comment:
   StringUtils tool  judges empty and white space better



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] RongtongJin merged pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
RongtongJin merged PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] coveralls commented on pull request #4820: [ISSUE #4805]In the subscribe mode, user-defined MessageQueueListener is supported. At the same time, you can specify the offset that the MessageQueue will commit

Posted by GitBox <gi...@apache.org>.
coveralls commented on PR #4820:
URL: https://github.com/apache/rocketmq/pull/4820#issuecomment-1214185473

   
   [![Coverage Status](https://coveralls.io/builds/51641355/badge)](https://coveralls.io/builds/51641355)
   
   Coverage decreased (-0.03%) to 49.195% when pulling **95d7648d0fec641e1a9fb35c57d3219f15f857a2 on sunxiaojian:optimize-client-consumer** into **8dd07c84697d3709f1f4bef5d78089b7d171b6cd on apache:develop**.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org