-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The doStop method for StreamingSubscriberClient seems like it may be the opposite order of what would allow it to shut down most quickly and cleanly. It first calls runShutdown(), which calls messageDispatcher.stop();. That method waits until there are no outstanding messages. How do we ensure that no new messages come in? If they do, we could seemingly end up in a state where the client can never shut down because more messages come in constantly.
We should see if this can happen and if so, consider changing the order in which we do the shutdown so we do clientStream.closeSendWithError(Status.CANCELLED.asException()); first.
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.