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

   ### Summary
   
   `BaseClient` awaits the heartbeat RPC but discards the response, catching 
only transport-level errors. Business-level failures arrive as normal gRPC 
responses — most notably `UNRECOGNIZED_CLIENT_TYPE`, which the proxy returns 
when it no longer holds this client's settings. The client treats it as a 
success, stays blind to settings loss, and never re-registers; the Java SDK 
checks the response status in `ClientImpl#doHeartbeat`. With this fix a non-OK 
status counts as a heartbeat failure, feeding the existing consecutive-failure 
transport recovery (evict the stale channel, rebuild the telemetry session and 
re-sync settings).
   
   ### Changes
   
   - BaseClient: run `StatusChecker` on the heartbeat response status; non-OK 
is handled as a heartbeat failure
   - Rename `#doHeartbeat` to `protected doHeartbeat` for testability, 
mirroring Java `ClientImpl#doHeartbeat`
   - Extend `BaseClient.test.ts`: an `UNRECOGNIZED_CLIENT_TYPE` heartbeat 
response must be logged as a failure and, on the second consecutive failure, 
trigger channel eviction plus telemetry rebuild with settings re-synced
   
   ### How Did You Test This Change?
   
   - New unit test passes (direct-invocation path); an interval-driven variant 
exercising the real 10s heartbeat timer shows `{warnings:2, evict:1, telemetry 
streams:2}` post-fix vs `{0, 0, 1}` (completely blind) on the pre-fix build
   - `tsc` build and `eslint` clean (no new warnings); existing client tests 
unaffected
   


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