Skip to content

Register the MapsMessaging REST endpoint with Consul - #47

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

Register the MapsMessaging REST endpoint with Consul#47
mbuckton merged 2 commits into
developmentfrom
consul-service-registration

Conversation

@mbuckton

@mbuckton mbuckton commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What changed

  • read the rest endpoint from service metadata
  • register its address and port as the MapsMessaging Consul service
  • preserve the full messaging endpoint map as Consul service metadata
  • run the TCP health check against the advertised REST endpoint
  • determine the advertised local address using the OS route to the configured Consul host
  • reject missing, malformed, or wildcard REST endpoints
  • support IPv4 and IPv6 endpoints

Why

The existing registration advertises a hard-coded port and asks the Consul agent to check localhost. That checks the Consul agent's host rather than the MapsMessaging server when Consul is remote.

Route-based address selection also avoids advertising an unrelated interface on multi-homed systems.

Companion change

MapsMessaging server PR: Maps-Messaging/mapsmessaging_server#2170

Validation

Added focused tests covering IPv4, IPv6, missing endpoints, malformed endpoints, wildcard addresses, route-based local-address selection, and invalid Consul URLs. git diff --check passes.

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

Use the advertised REST endpoint for the Consul service address, port, metadata, and TCP health check.

NO-ISSUE
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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: 995d3538-c394-451f-b4a5-098f803eb1c2

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.

Resolve the local interface address chosen to reach the configured Consul host.

NO-ISSUE
@mbuckton
mbuckton marked this pull request as ready for review August 12, 2026 03:38
@mbuckton
mbuckton merged commit c02d8ba into development Aug 12, 2026
1 check passed
@mbuckton
mbuckton deleted the consul-service-registration branch August 12, 2026 03:39
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