google-cloud-lib/src/main/java/com/streamsets/pipeline/stage/pubsub/origin/PubSubSource.java
private InstantiatingGrpcChannelProvider getChannelProvider() {
    return SubscriptionAdminSettings
        .defaultGrpcTransportProviderBuilder()
        .setMaxInboundMessageSize(MAX_INBOUND_MESSAGE_SIZE)
        .setEndpoint(Strings.isNullOrEmpty(conf.advanced.customEndpoint) ? SubscriptionAdminSettings
            .getDefaultEndpoint() : conf.advanced.customEndpoint)
        .build();
  }
private InstantiatingGrpcChannelProvider getChannelProvider() {
    return SubscriptionAdminSettings
        .defaultGrpcTransportProviderBuilder()
        .setMaxInboundMessageSize(MAX_INBOUND_MESSAGE_SIZE)
        .setEndpoint(Strings.isNullOrEmpty(conf.advanced.customEndpoint) ? SubscriptionAdminSettings
            .getDefaultEndpoint() : conf.advanced.customEndpoint)
        .build();
  }
Creates a channel provider shared by each subscriber. It is basically the default ChannelProvider with the
exception that it can be configured with a custom endpoint, for example when running against the PubSub Emulator.

@return channel provider based on the stage configuration.