Doc update for Spring Pub/Sub subscriber health check setup #2470
Labels
documentation
Improvements or additions to documentation
priority: p2
type: enhancement
New feature or request
Describe the bug
we recently enabled Pub/Sub subscriber health check for our spring boot application. In the doc: https://googlecloudplatform.github.io/spring-cloud-gcp/reference/html/pubsub.html#_cloud_pubsub_subscription_health_indicator, it is not quite clear how the subscriber healthcheck knows the subscription name.
We use PubSubInboundChannel to integrate with Pub/Sub (https://cloud.spring.io/spring-cloud-static/Greenwich.RELEASE/multi/multi__spring_integration.html). After some investigation in the library code, I found out the lib has an auto-configured bean for healthTrackerRegistry, and we need to set the healthTrackerRegistry in the PubSubInboundChannelAdapter in order to make the subscriber healthcheck work.
I don't see this mentioned in the doc, and I thought the spring.cloud.gcp.pubsub.health.subscription is the subscriber name for the health check and it would only check if the service receives 404 or 403 if this value is not set (the configuration for both pubsub and pubsub-subscriber healthcheck are allocated together ). It would be great if the doc can be updated with more instruction to set up the pub/sub subscription health check.
Sample
application.yaml
PubSubListener.java
The text was updated successfully, but these errors were encountered: