Receive stream events from events-broker directly

Gerrit EventBus was not designed to manage the receiver
failures, making the execution of replication unreliable
without the implementation of custom-retry logic based on
replication tasks.

Receive the pull replication events directly from the events-broker
which is capable of controlling the acking of messages and their
redeliver in case of failures.

This requires the additional parameter replication.streamEventsTopic
which points to the topic name to use for receiving events.

Pull-replication will be able to work:
- alongside multi-site, by setting "replication.consumeStreamEvents"
  to true
- standalone by setting the topic in "replication.eventBrokerTopic"

Note that if replication.consumeStreamEvents is set to true
replication.eventBrokerTopic will be ignored.

Issue: Bug 16575
Change-Id: Ibffed26eda4ca852e2599ffe664e8d39e35e9dd3
10 files changed
tree: 8fb94b071c33f2fe250f9c627bf5a4e2bd4ca891
  1. src/
  2. BUILD
  3. external_plugin_deps.bzl
  4. Jenkinsfile
  5. LICENSE