Skip to content

Complete transport health checks: all 7 remaining transports + IHealthCheck adapter#2444

Merged
jeremydmiller merged 2 commits intomainfrom
transport-health-checks-remaining
Apr 6, 2026
Merged

Complete transport health checks: all 7 remaining transports + IHealthCheck adapter#2444
jeremydmiller merged 2 commits intomainfrom
transport-health-checks-remaining

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

Completes wolverine#2400 by adding health check implementations for all remaining transports and an ASP.NET Core IHealthCheck adapter with startup grace period.

New health check implementations:

  • RedisHealthCheckIConnectionMultiplexer.IsConnected + StreamLengthAsync for broker queue depth
  • NatsHealthCheckNatsConnection.ServerInfo availability
  • MqttHealthCheckIManagedMqttClient.IsConnected (no queue depth — MQTT is pub/sub)
  • PulsarHealthCheckIPulsarClient initialization check
  • SqsHealthCheckIAmazonSQS.ListQueuesAsync probe + GetQueueAttributesAsync for queue depth
  • AzureServiceBusHealthCheckGetNamespacePropertiesAsync probe + GetQueueRuntimePropertiesAsync for depth
  • KafkaHealthCheckAdminClient.GetMetadata for broker connectivity

ASP.NET Core integration:

  • WolverineTransportHealthCheckAdapter wraps WolverineTransportHealthCheck as IHealthCheck
  • 30-second startup grace period prevents false Unhealthy reports during initialization

Wiring: Each transport's BuildHealthCheck() implemented and returns the transport-specific health check.

Transport coverage matrix

Transport Connection Check Queue Depth Probe Type
RabbitMQ ConnectionMonitor.IsConnected/IsBlocked MessageCountAsync Passive
Redis IConnectionMultiplexer.IsConnected StreamLengthAsync Passive
NATS ServerInfo availability N/A (future: JetStream) Passive
MQTT IManagedMqttClient.IsConnected N/A (pub/sub) Passive
Pulsar IPulsarClient != null N/A Passive
SQS ListQueuesAsync probe GetQueueAttributes Active
Azure Service Bus GetNamespaceProperties probe GetQueueRuntimeProperties Active
Kafka AdminClient.GetMetadata N/A (future: consumer lag) Active

Test plan

  • All 8 transport projects build with 0 errors
  • Smoke tests inherited from TransportCompliance<T> pass for each transport:
    • can_collect_endpoint_health_snapshots_without_error
    • receiver_endpoint_health_includes_listeners
    • sender_endpoint_health_includes_senders
    • transport_health_check_does_not_throw
  • WolverineTransportHealthCheckAdapter reports Healthy during grace period
  • Active probes (SQS, ASB, Kafka) handle connection failures gracefully (return Unhealthy, not throw)

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits April 6, 2026 16:44
…ck adapter

New health check implementations:
- RedisHealthCheck: IConnectionMultiplexer.IsConnected + StreamLengthAsync for queue depth
- NatsHealthCheck: NatsConnection.ServerInfo availability
- MqttHealthCheck: IManagedMqttClient.IsConnected (no queue depth — MQTT is pub/sub)
- PulsarHealthCheck: IPulsarClient initialization check
- SqsHealthCheck: IAmazonSQS.ListQueuesAsync probe + GetQueueAttributesAsync for queue depth
- AzureServiceBusHealthCheck: GetNamespacePropertiesAsync probe + GetQueueRuntimePropertiesAsync for depth
- KafkaHealthCheck: AdminClient.GetMetadata for broker connectivity

Each transport's BuildHealthCheck() wired in the transport class.

ASP.NET Core integration:
- WolverineTransportHealthCheckAdapter: wraps WolverineTransportHealthCheck as IHealthCheck
- Startup grace period (30s default) prevents false Unhealthy during initialization

All transport projects build with 0 errors. Smoke tests inherited from
TransportCompliance base class cover all implementations.

Completes wolverine#2400.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…perly

- Catch OperationCanceledException in SocketListener.DisposeAsync when the
  receiving loop task is cancelled during teardown
- Convert GloballyLatchedListenerTests from IDisposable to IAsyncLifetime
  to properly await host startup and shutdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit c5ea7d3 into main Apr 6, 2026
15 of 19 checks passed
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