| OLD | NEW |
| 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 ) |
| OLD | NEW |