Sitelet https://github.com/googleapis/google-cloud-java/issues/13049
Skip to content

[java-pubsub] Allow user to configure usage of REST Transport #13049

Description

@sanjivr

Is your feature request related to a problem? Please describe.

The PubSub Java SDK does not work when configured with InstantiatingHttpJsonChannelProvider.
It only supports InstantiatingGrpcChannelProvider. The Publisher implementation
provided by the SDK is tightly coupled with a Grpc transport.

Describe the solution you'd like

Update the Publisher and Subscriber implementations to support InstantiatingHttpJsonChannelProvider

Describe alternatives you've considered

None

Additional context

  • We have a requirement for on-premise clients to access PubSub only through a TLS terminating proxy
    which performs additional validation on request attributes to limit traffic to just allowlisted GCP projects
    or pubsub topics
    • In the TLS terminating mode, the proxy doesn't support grpc. As such all clients leveraging the official PubSub Java SDK are unable to utilize this TLS terminated proxy approach.

Activity

  1. sanjivr commented on Jun 13, 2024

    @sanjivr
    Author

    We have patched the Publisher implementation to support InstantiatingHttpJsonChannelProvider
    and verified that the same works for our use case.

    googleapis/java-pubsub#2075 illustrates the patch.

    Please let us know whether there are any limitations in the implementation approach and
    if it can be considered for general availability.

  2. michaelpri10 commented on Sep 12, 2024

    @michaelpri10
    Contributor

    Hello! Thank you for raising this concern and your proposed patch. One concern we have is that this would bring the Java client library out-of-sync with our other client libraries. Additionally, a change like this will require a significant amount of testing to ensure that the new transport type is properly supported. I will be leaving this opened for now and will update with more information in the future as plans change or this becomes a priority for this client library.

  3. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Sep 12, 2024
  4. changed the title [-]Allow user to configure usage of REST Transport[/-] [+][java-pubsub] Allow user to configure usage of REST Transport[/+] on May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions