Extension plugin for the high-availability plugin which uses reliable messaging for message forwarding using the PubSub service of GCP.

Clone this repo:

Branches

  1. b532aa1 Simplify exception handling in PubSubMessageProcessor by Sasa Zivkov · 2 weeks ago master
  2. fbc027c Adapt to CommandProcessor.handle() returning CompletableFuture<Boolean> by Sasa Zivkov · 4 weeks ago
  3. c67c79d Adapt to the handler API cleanup in the HA plugin by Sasa Zivkov · 4 weeks ago
  4. 779bb54 Update testcontainers to 1.21.4 by Thomas Dräbing · 5 months ago
  5. 8ba4623 Initial version by Sasa Zivkov · 10 weeks ago

Google GCP pubsub messaging for the Gerrit's high-availability plugin

This plugin provides an extension of the Gerrit's high-availability plugin: it provides GCP pubsub based message forwarding.

License

This plugin is released under the same Apache 2.0 license and copyright holders as of the Gerrit Code Review project.

How to build

Refer to the build instructions in the plugin documentation.

Installation

Install

  • the high-availability-gcp plugin in the Gerrit site's plugins folder.

Sample configuration

This is a minimal configuration:

[pubsub]
  projectId = my-gcp-project
  privateKeyLocation = /path/to/private/key/my-gcp-project-6f0d80a3f655.json

A complete set of configuration options is given in the following example. The example values given here are also the default values:

[pubsub]
  projectId = my-gcp-project
  privateKeyLocation = /path/to/private/key/my-gcp-project-6f0d80a3f655.json
[pubsub "topics"]
  main = default
  streamEvents = stream-events
[pubsub "limits"]
  subscriptionTimeout = 10s
  shutdownTimeout = 10s
  publisherThreadPoolSize = 4
  subscriberThreadPoolSize = 4
[pubsub "retention"]
  ackDeadline = 10s
  messageRetentionDuration = 7d
  retainAckedMessages = false
[pubsub "retry"]
  maxDeliveryAttempts = 5
  minimumBackoff = 10s
  maximumBackoff = 10m