Merge changes from topic 'events'

* changes:
  Update replication plugin
  Add EventDispatcher interface and use it.