Skip to content

[ISSUE #11623] Support extension metadata in proxy heartbeat synchronization - #11624

Open
Allenhuangrui wants to merge 1 commit into
apache:developfrom
Allenhuangrui:codex/heartbeat-sync-ext-info
Open

Allenhuangrui wants to merge 1 commit into
apache:developfrom
Allenhuangrui:codex/heartbeat-sync-ext-info

Conversation

@Allenhuangrui

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #11623

Brief Description

Allow proxy integrations to propagate optional consumer metadata through heartbeat synchronization without duplicating the heartbeat sender/receiver or overloading protocol-specific channel data.

  • Add an optional Map<String, String> extInfo to HeartbeatSyncerData.
  • Add optional sender and receiver callbacks, configurable through HeartbeatSyncer and ClusterConsumerManager. The sender runs before broadcasting registration/unregistration; the receiver runs on the actual cached or newly decoded RemoteChannel before consumer registration/unregistration.
  • Log callback exceptions and continue the existing heartbeat operation. Existing constructors and the behavior with no callbacks remain unchanged. Messages without extensions remain supported, and the core does not interpret extension keys.

How Did You Test This Change?

  • Ran the 9 new tests in HeartbeatSyncerDataTest and HeartbeatSyncerExtInfoTest in a remote Kubernetes test environment on JDK 21, using the available dependency classpath. All passed.
  • Covered extension round trips, legacy messages without extensions, cached-channel reuse, callback ordering for registration/unregistration, failure isolation, self-broadcast filtering, and manager callback configuration.
  • Compiled the changed production classes with javac --release 8.
  • Checked all five changed/new Java files with the repository's style/rmq_checkstyle.xml (Checkstyle 9.3); no violations. git diff --check also passed.

The full Maven reactor build and a live multi-proxy rollout have not been run for this upstream change.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.91%. Comparing base (e114b54) to head (a34378b).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11624      +/-   ##
=============================================
+ Coverage      50.86%   50.91%   +0.04%     
- Complexity     14881    14906      +25     
=============================================
  Files           1391     1391              
  Lines         103773   103799      +26     
  Branches       13614    13616       +2     
=============================================
+ Hits           52789    52851      +62     
+ Misses         44724    44694      -30     
+ Partials        6260     6254       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support extension metadata in proxy heartbeat synchronization

2 participants