You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/22 02:44:10 UTC

[GitHub] [rocketmq-flink] SOD-DOB opened a new issue, #75: I have a question about DEFAULT_START_MESSAGE_OFFSET

SOD-DOB opened a new issue, #75:
URL: https://github.com/apache/rocketmq-flink/issues/75

   `public static final long DEFAULT_START_MESSAGE_OFFSET = -1;`
   
   Why is the default value -1? It causes the following error:
   
   `
   For more information, please visit the url, http://rocketmq.apache.org/docs/faq/
   	at org.apache.rocketmq.flink.legacy.RocketMQSourceFunction.lambda$null$1(RocketMQSourceFunction.java:339) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at org.apache.rocketmq.flink.legacy.common.util.RetryUtil.call(RetryUtil.java:46) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at org.apache.rocketmq.flink.legacy.RocketMQSourceFunction.lambda$run$2(RocketMQSourceFunction.java:243) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_302]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_302]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
   
   `


-- 
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.apache.org

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


[GitHub] [rocketmq-flink] deemogsw commented on issue #75: I have a question about DEFAULT_START_MESSAGE_OFFSET

Posted by GitBox <gi...@apache.org>.
deemogsw commented on issue #75:
URL: https://github.com/apache/rocketmq-flink/issues/75#issuecomment-1323758766

   > `public static final long DEFAULT_START_MESSAGE_OFFSET = -1;`
   
   It doesn't look like master branch.Could you provide more information like the latest commit ID or code snippet .


-- 
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


[GitHub] [rocketmq-flink] SOD-DOB commented on issue #75: I have a question about DEFAULT_START_MESSAGE_OFFSET

Posted by GitBox <gi...@apache.org>.
SOD-DOB commented on issue #75:
URL: https://github.com/apache/rocketmq-flink/issues/75#issuecomment-1324617777

   > `public static final long DEFAULT_START_MESSAGE_OFFSET = -1;`
   This parameter is in RocketMQConfig 
   https://github.com/apache/rocketmq-flink/blob/main/src/main/java/org/apache/rocketmq/flink/legacy/RocketMQConfig.java
   
   When I read rocketMq for the first time, the rocketMq console displayed the offset=0 of the queue in the current topic. 
   At this time, I started flink-rocketmq to consume the topic, it would report the following error, and it could not consume the queue with offset=0
   
   ```
   java.lang.RuntimeException: org.apache.rocketmq.client.exception.MQClientException: offset < 0
   For more information, please visit the url, http://rocketmq.apache.org/docs/faq/
   	at org.apache.rocketmq.flink.legacy.RocketMQSourceFunction.lambda$null$1(RocketMQSourceFunction.java:339) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at org.apache.rocketmq.flink.legacy.common.util.RetryUtil.call(RetryUtil.java:46) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at org.apache.rocketmq.flink.legacy.RocketMQSourceFunction.lambda$run$2(RocketMQSourceFunction.java:243) ~[blob_p-b39848a6520d4473030e80a1af68842bda0d1497-439037d8a6ae48b5fa69464d73041c8f:?]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_302]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_302]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
   ```
   
   so I think It's should set offset = 0 instead -1 in org/apache/rocketmq/flink/legacy/RocketMQSourceFunction.java
   ![image](https://user-images.githubusercontent.com/47728686/203486214-12a7beb4-b6e2-427f-a55f-cff2f3750289.png)
   


-- 
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