wxyun2 opened a new issue, #1392:
URL: https://github.com/apache/rocketmq-clients/issues/1392

   ### 问题背景
   
   PushConsumer 的 `MessageListener` 同步返回 `ConsumeResult`。应用把任务交给其他线程后立即返回 
SUCCESS,会在实际处理结束前推进确认;在监听器内等待异步任务完成,又会持续占用消费线程。
   
   需要一种可选接口,在复用 PushConsumer 
接收、缓存和调度机制的同时,让实际处理的完成状态决定确认时机。消费并发和缓存限制主要在构建阶段设置,也缺少原实例上的运行期调整入口。
   
   ### 期望行为
   
   新增 `AsyncMessageListener.consumeAsync(MessageView)`,返回实际处理的 
`CompletionStage<ConsumeResult>`。未完成 stage 计入消费并发,完成后再推进现有 ACK 
或失败路径。同步异常、异步异常、取消和空值都有明确的失败语义。
   
   异步消费需要同步定义 FIFO 
顺序、hook/统计时机、接收交接、缓存保留及关闭排空,不能把“监听器已返回”当作“消息已处理完成”。运行期调参应更新同一套消费准入和缓存限制,缩容允许已有任务结束。
   
   沿用现有服务端 autoRenew 协议及其时长限制。Stage 完成表示处理结果就绪,不代表 ACK RPC 已成功;应用仍需要幂等,返回的 
stage 必须最终完成。
   


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