Перейти к основному содержимому
Эта страница ещё не переведена

Ниже показан английский оригинал.

endpoint

endpoint names another Pub/Sub endpoint, such as a locational endpoint that keeps every request of the service in one region.

By default the broker reaches the global endpoint, https://pubsub.googleapis.com. A locational endpoint, such as https://us-east1-pubsub.googleapis.com, routes every request to that region. Two Pub/Sub guarantees hold only inside one region. Messages that share an ordering key arrive in order when they are published to the same region. An exactly-once subscription guarantees one delivery to subscribers that connect in the region of the subscription. The endpoint applies to every client of the broker: subscriptions, publishers and the topology calls at startup. The AsyncAPI server reports the endpoint's host.

Example​

Every request of the service goes to us-east1.

/// The regional endpoint of `us-east1`: every request of the service goes to that region.
fn regional() -> PubSubBroker {
PubSubBroker::new("my-project").endpoint("https://us-east1-pubsub.googleapis.com")
}