Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
OS: linux
branch: develop
No response
PushConsumer use pop mode to consume, configurations is :
popInvisibleTime=10000 # 10s clientRebalance=false # use pop mode maxReconsumeTimes=0 # no retry
If consumption cost time is large than popInvisibleTime, it will still be consumed again and maxRecosumeTimes is not worked
maxRecosumeTimes
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer(CONSUMER_GROUP); consumer.subscribe(TOPIC, "*"); consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET); consumer.registerMessageListener(new MessageListenerConcurrently() { @Override public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) { System.out.printf("%s Receive New Messages: %s %n", Thread.currentThread().getName(), msgs); try { Thread.sleep(15000); } catch (InterruptedException e) { throw new RuntimeException(e); } return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } }); consumer.setClientRebalance(false); consumer.setPopInvisibleTime(10000); consumer.setMaxReconsumeTimes(0); consumer.start(); System.out.printf("Consumer Started.%n");
Messages are consumed only once
Always being consumed
The text was updated successfully, but these errors were encountered:
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
OS: linux
RocketMQ version
branch: develop
JDK Version
No response
Describe the Bug
PushConsumer use pop mode to consume, configurations is :
If consumption cost time is large than popInvisibleTime, it will still be consumed again and
maxRecosumeTimes
is not workedSteps to Reproduce
What Did You Expect to See?
Messages are consumed only once
What Did You See Instead?
Always being consumed
Additional Context
No response
The text was updated successfully, but these errors were encountered: