GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: allow endpoint override on Publisher/Subscriber by chingor13 · Pull Request #5915 · googleapis/google-cloud-java

Conversation

@chingor13

@chingor13 chingor13 commented Jul 29, 2019

Copy link
Copy Markdown
Contributor

Fixes #5792

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chingor13
feat: allow endpoint override on Publisher/Subscriber
573b286
@chingor13
chingor13 requested a review from kamalaboulhosn July 29, 2019 18:19
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 29, 2019
kamalaboulhosn
kamalaboulhosn reviewed Jul 29, 2019
View reviewed changes
Comment thread ...le-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
.setCredentialsProvider(builder.credentialsProvider)
.setExecutorProvider(FixedExecutorProvider.create(executor))
.setTransportChannelProvider(builder.channelProvider);
.setTransportChannelProvider(builder.channelProvider)

@kamalaboulhosn kamalaboulhosn Jul 29, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the existence of setEndpoint, one would create a custom TransportChannelProvider and set the endpoint in there. If one does that and calls setEndpoint, which one will win?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chingor13 chingor13 Jul 29, 2019

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the TransportChannelProvider#needsEndpoint(), then the value configured with setEndpoint() will take effect via TransportChannelProvider#withEndpoint(String). So a custom TransportChannelProvider that specifies an endpoint would not be overwritten.

See https://github.com/googleapis/gax-java/blob/fd5740a2726d0ab3f3124351ed0384911fa8f5c2/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java#L154-L156

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

broady and anguillanneuf reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
kamalaboulhosn
kamalaboulhosn approved these changes Jul 30, 2019
View reviewed changes
@chingor13
chingor13 merged commit 34b20f8 into googleapis:master Jul 30, 2019
@chingor13
chingor13 deleted the pubsub-endpoint-override branch July 30, 2019 17:40
@kolea2 kolea2 mentioned this pull request Jul 31, 2019
Release google-cloud-java v0.103.0 #5950
Merged
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@chingor13
feat: allow endpoint override on Publisher/Subscriber (#5915)
5872cbd
meltsufin pushed a commit that referenced this pull request May 1, 2026
@chingor13
feat: allow endpoint override on Publisher/Subscriber (#5915)
fdb3c9d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@kamalaboulhosn kamalaboulhosn kamalaboulhosn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

PubSub: support setEndpoint on Publisher/Subscriber builders

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chingor13 @kamalaboulhosn @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.