mengnankkkk commented on issue #9535:
URL: https://github.com/apache/rocketmq/issues/9535#issuecomment-3078358142

   你好,这个问题是一个时序问题,一个topic被创建的时候,队列为null,最大偏移量为0
   然后生产者发送第一条消息的时候,最大偏移量为1。
   消费者启动的时候,查询最大偏移量为-1,然后调用maxoffset(mq),就会返回1.这样我们为0的消息就被跳过了。
   可以在发送消息前,可以先启动 Consumer 实例,或者在 Consumer 启动后等待一段时间再发送消息。
   然后在配置的时候,设置从ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET开始消费。
   也可以在代码方面更改,https://github.com/apache/rocketmq/pull/9552


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to