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\u003eThis page provides documentation and examples for configuring endpoints within the Google Cloud Pub/Sub C++ client library, with the latest release candidate being 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThe content demonstrates how to override the default endpoint for various Pub/Sub client classes, such as \u003ccode\u003ePublisher\u003c/code\u003e, \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.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize the \u003ccode\u003egoogle::cloud::EndpointOption\u003c/code\u003e to change the default endpoint when initializing any of the Pub/Sub client libraries.\u003c/p\u003e\n"],["\u003cp\u003eA comprehensive list of Pub/Sub C++ client versions is provided, ranging from version 2.11.0 to the latest release candidate, 2.37.0-rc, with links to specific documentation for each version.\u003c/p\u003e\n"],["\u003cp\u003eAn example is provided to override the endpoint in the \u003ccode\u003egoogle::cloud::pubsub::Publisher\u003c/code\u003e, and it also references where you can find other examples for other \u003ccode\u003e*Client\u003c/code\u003e classes.\u003c/p\u003e\n"]]],[],null,[]]