Listen for Changes In Cassandra Datastore?

前端 未结 3 1736
深忆病人
深忆病人 2021-01-01 04:01

I wonder if it is possible to add a listener to Cassandra getting the table and the primary key for changed entries? It would be great to have such a mechanism.

Chec

3条回答
  •  猫巷女王i
    2021-01-01 04:29

    If clients need to know about changes, the world has mostly gone to the message broker model-- a middleman which connects producers and consumers of arbitrary data. You can read about Kafka, RabbitMQ, and NATS here. There is an older DZone article here. In your case, the client writing to the database would also send out a change message. What's nice about this model is you can then pull whatever you need from the database.

    Kafka is interesting because it can also store data. In some cases, you might be able to dispose of the database altogether.

提交回复
热议问题