-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom subscription name for Pub/Sub healthcheck #236
Comments
Here are the detailed steps that will need to be taken for this task:
|
cc/ @ThusithaDJ |
@elefeint, thanks a lot for the information and the opportunity. I'll let you know when I'm having some doubts. |
Hey @elefeint, could you please let me know is it possible to test this implementation locally. I mean, should I build the project, get the actuator lib, add it into a sample project and try to do a health check? |
You can do it easiest with a Pub/Sub emulator (follow instructions here to start up emulator, and set environment variable As far as code, yes, you add |
Following @patpe 's line of thinking in spring-attic/spring-cloud-gcp#2628 (comment) What if the |
@elefeint I am investigating possible ways to resolve this and started to think about your proposal to allow for custom subscription names to pull from. The main issue with going down this route, I think, is that this health check will have side effects. Compare with the JDBC health checks which performs a simple query (e.g. If we allow for a custom subscription to health check from, users are expected to configure a subscription that are part of a business flow, e.g. a subscription on a business domain topic. What will the health check then do with the message it gets? Obviously it will @dzou I will give it a try to see if I can find a way to represent the internal state of the message subscription and use this for health check scenarios. |
@patpe I believe @elefeint was thinking of dedicating a separate subscription for the health check, since the current method of pulling from a non-existing subscription has its own issues. So, there wouldn't really need to be any side effect at all if it's a non-functional subscription to a non-functional topic or something like that. Either way, I think the idea of using the ongoing processing as a side-effect for health state is a valuable avenue to explore. |
Checking ongoing processing would also allow per-subscription health tracking, which would help with Spring Cloud Stream granular checks (spring-attic/spring-cloud-gcp#2631). My thinking about an "existing subscription" was that it would be safe to ack messages if received -- the subscription would either always remain empty or have non-business-logic no-op messages. |
@elefeint I'm having the same issue. Kubernetes kills my application under heavy load because of the liveness probe. Do you know when this fix are ready? |
@thayhoang You mainly need spring-attic/spring-cloud-gcp#2628, not this issue. As a workaround, you could disable the Pub/Sub healthcheck with |
@elefeint I understand that this issue (236) is a part of the work that you guys trying to fix it, Am I right? If not, what is it for? |
…dPlatform#330) Fixes: GoogleCloudPlatform#236. Co-authored-by: Mike Eltsufin <[email protected]>
Issue ported from spring-attic/spring-cloud-gcp#2630.
Currently, the Pub/Sub healthcheck attempts a pull from a nonexistent subscription. This has two negative consequences:
Allowing a pull from a known existing subscription would ameliorate issues like spring-attic/spring-cloud-gcp#2628 and spring-attic/spring-cloud-gcp#2570.
The text was updated successfully, but these errors were encountered: