github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/inputs/gcp_pubsub.md (about) 1 --- 2 title: gcp_pubsub 3 type: input 4 status: stable 5 categories: ["Services","GCP"] 6 --- 7 8 <!-- 9 THIS FILE IS AUTOGENERATED! 10 11 To make changes please edit the contents of: 12 lib/input/gcp_pubsub.go 13 --> 14 15 import Tabs from '@theme/Tabs'; 16 import TabItem from '@theme/TabItem'; 17 18 19 Consumes messages from a GCP Cloud Pub/Sub subscription. 20 21 ```yaml 22 # Config fields, showing default values 23 input: 24 label: "" 25 gcp_pubsub: 26 project: "" 27 subscription: "" 28 sync: false 29 max_outstanding_messages: 1000 30 max_outstanding_bytes: 1000000000 31 ``` 32 33 For information on how to set up credentials check out 34 [this guide](https://cloud.google.com/docs/authentication/production). 35 36 ### Metadata 37 38 This input adds the following metadata fields to each message: 39 40 ``` text 41 - gcp_pubsub_publish_time_unix 42 - All message attributes 43 ``` 44 45 You can access these metadata fields using 46 [function interpolation](/docs/configuration/interpolation#metadata). 47 48 ## Fields 49 50 ### `project` 51 52 The project ID of the target subscription. 53 54 55 Type: `string` 56 Default: `""` 57 58 ### `subscription` 59 60 The target subscription ID. 61 62 63 Type: `string` 64 Default: `""` 65 66 ### `sync` 67 68 Enable synchronous pull mode. 69 70 71 Type: `bool` 72 Default: `false` 73 74 ### `max_outstanding_messages` 75 76 The maximum number of outstanding pending messages to be consumed at a given time. 77 78 79 Type: `int` 80 Default: `1000` 81 82 ### `max_outstanding_bytes` 83 84 The maximum number of outstanding pending messages to be consumed measured in bytes. 85 86 87 Type: `int` 88 Default: `1000000000` 89 90