question

neerajk22 avatar image
neerajk22 asked Erick Ramirez edited

Can the C# driver send notifications when data is changed?

Any data change detection strategy in Datastax cassandra C# driver.

When any change in Cassandra table for any data update\delete operation need some trigger\event to catch in .Net C# side like there is SQLDependency class (works with SQL) which receives notifications when the original data in the database changes.

Need some implementation suggestions for same.

csharp driver
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

joao.reis avatar image
joao.reis answered joao.reis commented

At this time Apache Cassandra does not have that kind of feature so there is no way for the driver to provide such events. I believe the current CDC feature that exists in Apache Cassandra is based on logging so the driver can't do anything with that.

4 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

neerajk22 avatar image neerajk22 commented ·
ok so could you provide some alternative approach to achieve same ?
0 Likes 0 ·
joao.reis avatar image joao.reis neerajk22 commented ·

The applications that write to the Cassandra tables need to publish events in some sort of message bus that will notify other applications that subscribe to those events.

1 Like 1 ·
neerajk22 avatar image neerajk22 joao.reis commented ·
ok what's your view on creating .net app worker service or windows service that will keep running in background and listen to Cassandra table i.e. opening connection for long time and check for any data changes at regular interval ?
0 Likes 0 ·
Show more comments