blob: 2e9383841423ed801e71fd0313593120d054fbec [file] [log] [blame] [view]
Luca Milanesio8c72edb2021-04-20 12:46:45 +01001Configuration
2=========================
3
4The events-gcloud-pubsub plugin is configured by adding a plugin stanza in the
5`gerrit.config` file, for example:
6
7```text
8[plugin "events-gcloud-pubsub"]
9 numberOfSubscribers = 6
10 subscriptionId = instance-1
11 gcloudProject = test_project
12 privateKeyLocation = /var/gerrit/etc/secured_key.json
13
14```
15
16`plugin.events-gcloud-pubsub.gcloudProject`
17: GCloud [project name](https://cloud.google.com/docs/overview#projects)
18
19`plugin.events-gcloud-pubsub.subscriptionId`
20: Conditional. This value identifies the subscriber and it must be unique within your
21 Gerrit cluster to allow different Gerrit nodes to consume data from the
22 stream independently. It can be omitted when `gerrit.instanceId` is
23 configured, otherwise it is mandatory.
24 Default: `gerrit.instanceId` value (when defined)
25 See also: [gerrit.instanceId](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#gerrit.instanceId)
26
27`plugin.events-gcloud-pubsub.privateKeyLocation`
28: Path to the JSON file that contains service account key. The file
29 should be readable only by the daemon process because it contains information
30 that wouldnt normally be exposed to everyone.
31
32`plugin.events-gcloud-pubsub.numberOfSubscribers`
33: Optional. The number of expected events-gcloud-pubsub subscribers. This will be used
34 to allocate a thread pool able to run all subscribers.
35 Default: 6
36
37`plugin.events-gcloud-pubsub.sendAsync`
38: Optional. Send messages to GCloud PubSub asynchronously, detaching the calling
39 process from the acknowledge of the message being sent.
40 The drawback of the enabling the sendAsync parameter is that the broker would only
41 return the status of the successful invocation of the message send operation and not
42 the actual status received by the broker. This means that when sendAsync is enabled
43 'broker_msg_publisher_failure_counter' metric is not incremented when message send
44 failure occurs.
45 Default: true
46
47`plugin.events-gcloud-pubsub.ackDeadlineSeconds`
48: Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for
49 the subscriber to acknowledge receipt before resending the message.
50 Default: 10
51
52`plugin.events-gcloud-pubsub.subscribtionTimeoutInSeconds`
53: Optional. Maximum time in seconds to wait for the subscriber to connect to GCloud PubSub topic.
54 Default: 10
55
56`plugin.events-gcloud-pubsub.streamEventsTopic`
57: Optional. Name of the GCloud PubSub topic for stream events. events-gcloud-pubsub plugin exposes
58 all stream events under this topic name.
59 Default: gerrit