Skip to content

feat: add configurable health check point - #192

Closed
ShuranZhang wants to merge 1 commit into
mainfrom
health-check-endpoint
Closed

feat: add configurable health check point#192
ShuranZhang wants to merge 1 commit into
mainfrom
health-check-endpoint

Conversation

@ShuranZhang

Copy link
Copy Markdown
Contributor

Expose a new int config healthCheckPort .

  • It uses the same host you set to run your adapter(ie: adapter runs on localhost:9042, you set -DhealthCheckPort=8080, the health server sits on localhost:8080/debug/health).
  • To check the status, you need to query the /debug/health path of this endpoint
  • It will return an HTTP 200 OK status if adapter is running and the mux session was refreshed successfully.
  • If not fully ready, it returns HTTP 503 Service Unavailable.
  • If this option is not set, the readiness check HTTP endpoint
    will not be registered and no readiness checks will be available via HTTP.

@ShuranZhang
ShuranZhang force-pushed the health-check-endpoint branch 5 times, most recently from 271be8c to 5e7acb4 Compare August 11, 2025 22:08
@mayurkale22
mayurkale22 requested a review from pabloecol August 12, 2025 21:02
}

@Test
public void testHealthServerReturnsOk() throws Exception {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also add a test to confirm that the adapter starts ok but there is no health check server if the health check port is not provided?

final String maxCommitDelayProperty = System.getProperty(MAX_COMMIT_DELAY_PROP_KEY);
final boolean enableBuiltInMetrics =
Boolean.parseBoolean(System.getProperty(ENABLE_BUILTIN_METRICS_PROP_KEY, "false"));
final int healthCheckPort =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be better to make this an Integer and check for null instead of 0 in start()?

@ath-08 ath-08 closed this Aug 20, 2025
@ath-08
ath-08 deleted the health-check-endpoint branch August 20, 2025 22:50
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.

4 participants