I would like to stream data from a cassandra table which is updated in real time. Yes, it is a database but is there a way to do that? If so, keeping an offset or what CQL queries can I use ?
Short answer is no.
Long answer is with a lot of difficulty and smart clustering keys you can maybe do that. Basically if you insert data with a clustering key that always increases you can always just scan for clustering keys in a recent time gap. This will of course miss out-of-order inserts outside of your window. This may or may not be good enough for your use case.
Best answer in the future is Change Data Capture: https://issues.apache.org/jira/browse/CASSANDRA-8844
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With