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

   
   
   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and 
[link this pull request to that issue using 
keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>)
 to ensure automatic closure. -->
   
   - Fixes #10384
   
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer 
understand the reasons behind your changes. -->
   
   Lite exclusive eviction relied on a fire-and-forget unsubscribe 
notification. When the client missed it, the old consumer kept pulling, causing 
double consumption and breaking the exclusive contract.This PR adds a 
broker-local, in-memory tombstone keyed by (clientId, lmqName) as a server-side 
fallback:
   
   - Written synchronously on eviction, before client notification.
   - Checked at the Lite pull entry; rejected pulls reuse the existing "no 
message available" semantics, requiring no client change.
   - Lifecycle-aligned with the client's subscription set — cleared on explicit 
resubscription, full-sync reconciliation, and disconnect/timeout.
   - Self-heals lost notifications by re-sending unsubscribe when a heartbeat 
still reports a tombstoned lmqName.
   
   ### How Did You Test This Change?
   
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every 
pull request to have undergone thorough testing. -->
   
   - New unit tests for ExclusiveEvictionTombstones: add / contains / remove / 
removeAllOf / retainOnly with prefix-isolation and concurrency cases.
   - Extended LiteSubscriptionRegistryImplTest to cover:
     - Tombstone written on exclusive eviction;
     - Self-clear on the evicted client's resubscription;
     - Full-sync reconciliation: stale GC via retainOnly and re-notify on 
intersection;
     - Cleanup on disconnect/timeout, including the thisSub == null 
short-circuit path.
   - Updated PopLiteMessageProcessorTest for the clientId-aware pull path: 
pulls from a tombstoned client are rejected and return the "no message" result.
   - All affected modules pass mvn test.


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