Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: common/gcloud/pubsub/quota.go

Issue 1838303002: Use native Pub/Sub library primitives. (Closed) Base URL: https://github.com/luci/luci-go@logdog-go1.6
Patch Set: Use "Topic" instead of "NewTopic" ... don't want to create :) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « common/gcloud/pubsub/pubsub.go ('k') | common/gcloud/pubsub/retry.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package pubsub 5 package pubsub
6 6
7 import ( 7 import (
8 » "time" 8 » "google.golang.org/cloud/pubsub"
9 ) 9 )
10 10
11 // Cloud PubSub quota is documented here: 11 // Cloud PubSub quota is documented here:
12 // https://cloud.google.com/pubsub/quotas 12 // https://cloud.google.com/pubsub/quotas
13 const ( 13 const (
14 // MaxPublishSize is the maximum size, in bytes, of the published messag e 14 // MaxPublishSize is the maximum size, in bytes, of the published messag e
15 // (10 MB). 15 // (10 MB).
16 // 16 //
17 // See: https://cloud.google.com/pubsub/publisher 17 // See: https://cloud.google.com/pubsub/publisher
18 MaxPublishSize = 10 * 1024 * 1024 18 MaxPublishSize = 10 * 1024 * 1024
19 19
20 // MaxPublishBatchSize is the maximum PubSub batch size. 20 // MaxPublishBatchSize is the maximum PubSub batch size.
21 » MaxPublishBatchSize = 1000 21 » MaxPublishBatchSize = pubsub.MaxPublishBatchSize
22 22
23 // MaxProjectMessagesPerSecond is the maximum number of requests per sec ond, 23 // MaxProjectMessagesPerSecond is the maximum number of requests per sec ond,
24 // across the entire project. 24 // across the entire project.
25 MaxProjectMessagesPerSecond = 10000 25 MaxProjectMessagesPerSecond = 10000
26 26
27 // MaxSubscriptionPullSize is the maximum number of subscription records that 27 // MaxSubscriptionPullSize is the maximum number of subscription records that
28 // can be pulled at a time. 28 // can be pulled at a time.
29 » MaxSubscriptionPullSize = 100 29 » MaxSubscriptionPullSize = pubsub.DefaultMaxPrefetch
30
31 » // MaxMessageAckPerRequest is the maximum number of messages one can
32 » // acknowledge in a single "acknowledge" call.
33 » //
34 » // NOTE: This is not verified, and is inspired by "MaxSubscriptionPullSi ze".
35 » MaxMessageAckPerRequest = 100
36
37 » // DefaultMaxAckDelay is the default maximum ACK delay.
38 » DefaultMaxAckDelay = (60 * time.Second)
39 ) 30 )
OLDNEW
« no previous file with comments | « common/gcloud/pubsub/pubsub.go ('k') | common/gcloud/pubsub/retry.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698