Skip to content

Advertise the REST endpoint during Consul registration - #2170

Merged
mbuckton merged 2 commits into
developmentfrom
consul-service-registration
Aug 12, 2026
Merged

Advertise the REST endpoint during Consul registration#2170
mbuckton merged 2 commits into
developmentfrom
consul-service-registration

Conversation

@mbuckton

@mbuckton mbuckton commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add the running REST endpoint to the existing Consul metadata
  • use the REST manager's configured port
  • retain explicit REST bind addresses
  • replace 0.0.0.0, ::, and wildcard-only address lists with the local interface selected by the OS route to Consul
  • format IPv6 endpoints correctly
  • skip Consul service registration when the REST API is disabled

Why

Consul must advertise and health-check a reachable MapsMessaging address. A wildcard bind address is valid for listening but cannot be used by Consul clients.

For example, when Consul is at 10.140.62.193:8500, route-based selection advertises the Ethernet address 10.140.62.146, rather than an APIPA or Hyper-V adapter address.

Companion change

Configuration library PR: Maps-Messaging/configuration_library#47

Validation

Added focused tests for configured addresses, IPv4 wildcard replacement, wildcard lists, IPv6 formatting, and invalid ports. The companion library tests cover route selection and invalid Consul URLs. git diff --check passes.

The Maven test could not run in the available environment because the MapsMessaging and Maven repositories are not reachable and no dependency cache is available.

Add the running REST endpoint to Consul metadata and replace wildcard bind addresses with the server IP.

NO-ISSUE
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e3e1bebf-d1e7-48a1-85cd-1eb7205ca894

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Use the local interface selected for the configured Consul host when the REST API binds to wildcard addresses.

NO-ISSUE
@mbuckton
mbuckton marked this pull request as ready for review August 12, 2026 03:37
@mbuckton
mbuckton merged commit c81b298 into development Aug 12, 2026
2 of 3 checks passed
@mbuckton
mbuckton deleted the consul-service-registration branch August 12, 2026 03:37
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.

1 participant