In some cases, you may need to override the default endpoint used by the client library. Use the google::cloud::EndpointOption when initializing the client library to change this default. For example, this will override the default endpoint for google::cloud::pubsub::Publisher:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe page provides documentation and examples for overriding the default endpoint in the Google Cloud Pub/Sub C++ client library.\u003c/p\u003e\n"],["\u003cp\u003eVersion 2.37.0-rc is the latest release, and multiple versions, down to 2.11.0, are available with documentation on overriding the default endpoint.\u003c/p\u003e\n"],["\u003cp\u003eYou can use \u003ccode\u003egoogle::cloud::EndpointOption\u003c/code\u003e during client initialization to specify a custom endpoint, as shown in the provided code example for the \u003ccode\u003egoogle::cloud::pubsub::Publisher\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eExamples for overriding endpoints are also provided for \u003ccode\u003eSubscriber\u003c/code\u003e, \u003ccode\u003eBlockingPublisher\u003c/code\u003e, \u003ccode\u003eTopicAdminClient\u003c/code\u003e, \u003ccode\u003eSubscriptionAdminClient\u003c/code\u003e, and \u003ccode\u003eSchemaServiceClient\u003c/code\u003e classes.\u003c/p\u003e\n"],["\u003cp\u003eThis page offers Pub/Sub endpoint override details for version 2.29.0, and other versions are available for reference.\u003c/p\u003e\n"]]],[],null,[]]