I need to find a generic way to publish event on every action like saving, updating, deleting data in database, regardless of database used (can be Google Cloud Platform Datastore or any other repository). For now we are using aspects, but we found it slippery to use it for such a business logic like publishing events to e.g. Pubsub. I found a solution in Spring Data REST Core and @RepositoryEventHandler, but I cannot make it work with Spring Data Cloud Datastore repository, it is just not triggered. I tried it with REST calls, not unit tests; also used proper HTTP methods, but still does not work. Are there any funky, fancy solution to achieve my goal? Or maybe I just misunderstood the concept of RepositoryEventHandler annotation?
PS. I found one question regarding RepositoryEventHandler, but this still does not work for me. This is the topic.