Skip to content

Wire NatsConnection into HealthCheckServer readiness probe #204

@mvillmow

Description

@mvillmow

NatsConnection now exposes lock-free isConnected() / getState() for health checks, but HealthCheckServer's readiness probe always returns true. The readiness check should return false when NatsConnectionState != CONNECTED so Kubernetes stops routing traffic during NATS outages. Pass a NatsConnection* or a std::function<bool()> lambda capturing isConnected() to HealthCheckServer::setReadinessCheck() at startup.

Follow-up from #88

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions