f1amingo opened a new pull request, #1353:
URL: https://github.com/apache/rocketmq-clients/pull/1353

   ### Summary
   
   Node.js `PushConsumer.shutdown()` aborts process queues and the consume 
service immediately, then closes connections. Messages being received or 
consumed at that moment are discarded: in-flight listeners keep running after 
`shutdown()` resolves, and their ack/changeInvisibleDuration RPCs hit 
already-closed connections, causing unnecessary redeliveries. The Java client 
instead drains inflight receives and consumption with a 1s buffer before 
closing.
   
   ### Changes
   
   - Wait for inflight receive requests (bounded by `requestTimeout + 
longPollingTimeout`) after dropping process queues
   - Wait until every cached message is consumed and settled before aborting 
queues and the consume service
   - Keep a 1s buffer for ack/changeInvisibleDuration callbacks
   
   ### How Did You Test This Change?
   
   - `tsc --noEmit` and `eslint` pass; environment-independent unit tests pass
   - E2E against a real RocketMQ 5.x instance: `close()` called mid-consumption 
returned only after every delivered message finished; an intentionally failed 
message settled before return; no redelivery observed by a second consumer
   


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