namespace pubsub = ::google::cloud::pubsub;
using ::google::cloud::Options;
[]() {
// This service supports specifying a regional or locational endpoint prefix
// when creating the SubscriptionAdminConnection.
// For example, to connect to "europe-central2-pubsub.googleapis.com":
auto pub = pubsub::BlockingPublisher(
pubsub::MakeBlockingPublisherConnection("europe-central2"));
// This configuration is common with Private Google Access:
// https://cloud.google.com/vpc/docs/private-google-access
auto vpc_pub =
pubsub::BlockingPublisher(pubsub::MakeBlockingPublisherConnection(
Options{}.set<google::cloud::EndpointOption>(
"private.googleapis.com")));
}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[[["The latest version available is 2.37.0-rc, which can be accessed via the provided link."],["The list provides access to documentation for a range of versions, starting from version 2.11.0 up to the latest release candidate."],["The content highlights the `BlockingPublisher` functionality and how to override its default endpoint."],["Each version's documentation can be found via its respective link."],["The listed versions all relate to the C++ `pubsub` documentation."]]],[]]