问题
How can I get a record from cassandra database every time that it is add using datastax for java? That is, how can I "listen" cassandra database? Thanks
回答1:
There is no easy way to do it. Cassandra has Change Data Capture functionality, but it's quite low level (and could depend on version of Cassandra), and it's not easy to use it. You can write your own implementation (pointers in link above), or use something like this, but it's very old. And you'll need to handle deduplication yourself, as when you have RF > 1, every node will receive & write the data.
来源:https://stackoverflow.com/questions/51896684/listen-to-a-cassandra-database-with-datastax