-
Notifications
You must be signed in to change notification settings - Fork 291
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
Spring Cloud GCP Pub/Sub Binder: enabling/disabling service account causes different behaviour for subscriptions #2158
Comments
Hi @mayur-solace, thanks for reporting this. Would you mind sharing a reproducible project so we can look into it? Is the configuration and the functions the only difference with the available sample applications? |
Yes only configuration shared above and functions different. I pushed modified sample here > https://github.com/mayur-solace/spring-cloud-gcp/pull/1/files |
@mayur-solace If I understand correctly, you are observing that after disabling and re-enable the service account, only the consumer with ordering enabled recovers? |
Your understanding is correct. In other word the issue that I'm reporting here is - why consumer with ordering not enabled don't recover?
In my test, both consumers are running in the same application. When service account is disabled, I see only a single thread printing the com.google.api.gax.rpc.UnauthenticatedException. The thread printing exception is one consuming from subscription with ordering not enabled. I could say this because of another issue I observer as mentioned below. Because of your above point, I did another test to see what happens when I send a message to subscription with ordering enabled through google console and service account used by SCSt application is still disabled.
If you notice, while thread bscriber-SE-1-4, bscriber-SE-1-1 is throwing exception, threads sub-subscriber4 and sub-subscriber2 received a message from subscription with ordering enabled.
When both the subscribers don't have ordering enabled, none of the consumers receives messages when service account is disabled and re-enabled. |
@TimurSadykov @maitrimangal Do you have any advice for us here? I believe this has more to do with auth and Pub/Sub than the wiring in Spring Cloud GCP. I suspect that auth tokens are still active for a short time after the account is disabled. |
@meltsufin where you able to reproduce the issue on your end. Is there a plan for fixing the bug. I see the priority assigned to this bug is P2. I think the priority should be higher because if the service account is disabled after initial connection Subscriber is still able to consume messages. |
@mayur-solace Would you be able to reproduce the issue with the Pub/Sub client library alone? This would help direct the issue to the team that is better positioned to investigate. |
ok, I will give a try to write a reproduction with the Pub/Sub client library. |
@meltsufin Find below the Pub/Sub client library samples for reproduction. SpringCloudGCPBug2158Subscriber.java Note: I used two separate service account keys for publisher and subscribers, because for this test I want publisher to continue working when I disable service account key used by subscriber. To summarize,
Steps:
|
Thank you so much of the repro @mayur-solace! For (1), it might be an issue in Spring Cloud GCP. Can you make that also a separate issue, but in this repo? |
Some more context on (1).
|
Filed the second issue to Pub/Sub client library googleapis/java-pubsub#1852. |
Setup
Steps:
I'm using this sample sink for reproduction with below configuration.
Background
I'm basically trying to simulate a scenario where the consumer may temporarily shutdown for some reason.
The text was updated successfully, but these errors were encountered: