-
Notifications
You must be signed in to change notification settings - Fork 310
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
PublisherFactory returns PublisherInterface instead of Publisher #790
Comments
Should have label "pubsub" but I cannot add labels. |
Additional info: Downgrading to 2.0.5 fixes the compilation error but the deployment fails. There is an issue with a class not found: |
@mlvandijk For the second issue, you'd have to also downgrade @meltsufin If we make |
@mlvandijk Can you just downcast @elefeint Your suggestion makes sense, but it will require quite a bit of boilerplate code. Ideally, |
Thank you both for your quick response. I will see what we can do today to work around it and get back to you. |
Update: Casting |
I've filed googleapis/java-pubsub#949 in the client library -- if it's meant to be a public surface, we should support it. If not, the downcasting workaround is fine. |
Update: We are still having trouble with our application so we had to roll back (with the downcast). We are still investigating to pinpoint the issue. If relevant, I will provide additional info here. |
That's interesting. What type of issues (memory? throughput?). And are the problems coming up in the "publish to pub/sub" scenario or elsewhere? |
We noticed that we were no longer processing messages, and our k8s pods kept crashing. For context: We have several applications that process large amounts of data. Two of them seem to have a problem with the upgrade from |
Update: The issue with crashing pods might be related to the fact that gcp 2.0.6 has also a new health indicator for spanner. See https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/643/files - we are confirming now (but it's the end of the work day here) |
We narrowed it down to a Spanner health check that was enabled by default. Disabling it fixed our problems (other than the original issue). Thanks for your help & quick responses! |
@mlvandijk Can you provide some more information on how the Spanner health checking was causing problems? Are you using Spanner in the application? The health check should not be turned on, unless you're using the Spanner Spring Boot starter. |
Spring Boot Actuator warns against using health checks to determine kubernetes liveness, but we've seen users of Spring Cloud GCP have production issues because Kubernetes liveness was tied to Spring Boot Actuator healthchecks. Is using health checks in liveness indicator some kind of default somewhere? |
Yes, we are using Spanner. The health check was turned on by default (that might have been done by our internal framework); we turned it off. |
Afaik it was this change: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/643/files
We set |
It's correct that most health indicators are enabled by default, but they should not be tied to Liveness group, which is what controls the Kubernetes restarts. So somehow these custom informational indicators are making their way to |
Describe the bug
There was a change in the PublisherFactory in
com.google.cloud:spring-cloud-gcp-pubsub
version 2.0.6 used incom.google.cloud:spring-cloud-gcp-starter-pubsub
which caused one of our applications to have a compilation error on the following line:The reason for this is as follows:
In version 2.0.5 the PublisherFactory returns a Publisher
while in v 2.0.6 it returns a PublisherInterface
The PublisherInterface doesn't expose the Publisher method
publishAllOutstanding()
.This change is not mentioned in the change log for (release 2.0.6)[https://github.com/GoogleCloudPlatform/spring-cloud-gcp/releases/tag/v2.0.6].
The change was part of PR #548.
In this change I notice that the
CachingPublisherFactory
implementation of PublisherFactory was also change to return a PublisherInterface instead of a Publisher, but theDefaultPublisherFactory
was not (and still returns a Publisher).Since this isn't mentioned in the release notes, I wonder if this change was intentional?
And also whether we can fix our compilation error by casting to ashould assume that theDefaultPublisherFactory
going forward, orpublishAllOutstanding()
is not intended to be exposed (as it's not part of the PublisherInterface).Update: casting to DefaultPublisherFactory didn't work.
The text was updated successfully, but these errors were encountered: