Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Unable to start the subscription with partial flowcontrol details #291

Closed

Description

@nareshgnT

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). PubSub
    General, Core, and Other are also allowed as types
  2. OS type and version: Mac
  3. Java version: 1.8
  4. pubsub version(s): 1.108.0

Steps to reproduce

  1. Set partial flowcontrol to start the subscription i.e only provide MaxOutstandingElementCount

Code example

Subscriber.newBuilder(subscriptionName, messageReceiver)
                            .setFlowControlSettings(
                                    FlowControlSettings.newBuilder()
                                            .setMaxOutstandingElementCount(getMaxOutstandingElementCount(subscription))
                                            .build())
                            .build();

Stack trace

Caused by: java.lang.NullPointerException: null
	at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.initialize(StreamingSubscriberConnection.java:220)
	at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.doStart(StreamingSubscriberConnection.java:128)
	at com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:148)
	at com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:248)
	at com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:120)
	at com.google.cloud.pubsub.v1.Subscriber.startConnections(Subscriber.java:380)

same configuration is working with pubsub v1.103.1 with v1.108.0 is not working because the default value is not set for maxOutstandingRequestByte which result in nullpointer

Activity

  1. added
    priority: p2Moderately-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.
    on Jul 23, 2020
  2. hannahrogers-google commented on Jul 23, 2020

    @hannahrogers-google
    Contributor

    Thanks for bringing this to our attention - a fix is on the way and will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: pubsubIssues related to the googleapis/java-pubsub API.priority: p2Moderately-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.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions