Run apply-object before the ref-updated stream event

The pull-replication plugin's promise is to run apply-object
to replicate the refs in msec, so that the overall end-to-end
operation runs synchronously. However, the ref-updated was
executed before the apply-object, leaving room for the event
consumer to potentially fail when looking at the ref value because
the apply-object may have completed or not.

Use the same EventListener interface used in the stream-event
listeners for making sure that apply-object is always executed
before ref-updated.

Also amend the test environment for the broker scenario for
including the apply-object use-case as well, where the events
broker is used as fallback by putting the events-kafka plugin
to the bottom of the plugin loading priority.

Change-Id: If96082f4338164e1674bae657ab4184577d825f2
9 files changed
tree: b8fbebe01b57bb16de83e9331c3bd94762ad217d
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. external_plugin_deps.bzl
  6. Jenkinsfile
  7. LICENSE