# Why do my clients need to register for CHANGE events?

**URL:** <https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342>\
**Category:** ScyllaDB\
**Tags:** go-driver\
**Created:** [July 23, 2024, 2:41pm UTC](https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342 "2024-07-23T14:41:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckjones](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/ckjones/32/1034_2.png) [@ckjones](https://forum.scylladb.com/u/ckjones)\
**Post date:** [July 23, 2024, 2:41pm UTC](https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342/1 "2024-07-23T14:41:28Z")

</div>

I’ve noticed when using the gocql driver that, by default, my client will register for TOPOLOGY\_CHANGE, STATUS\_CHANGE, and SCHEMA\_CHANGE events. I can disable them using the driver, but I fear that might be a bad idea. How exactly do clients use these events? Doesn’t statement caching solve most of the problems with topology/schema changes?

---

<div class="post-metadata">

**Author:** ![Piotr\_Smaron](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/piotr_smaron/32/586_2.png) [@Piotr\_Smaron](https://forum.scylladb.com/u/Piotr_Smaron)\
**Post date:** [July 24, 2024, 6:38am UTC](https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342/2 "2024-07-24T06:38:12Z")

</div>

These events are part of CQL standard, see section 4.2.6. “Event” in [Apache Cassandra | Apache Cassandra Documentation](https://cassandra.apache.org/_/native_protocol.html). This way the driver stays in sync with the db. If by statement caching you mean that some CQL queries are cached, then it’s not enough, because these don’t reflect the cluster state.

---

<div class="post-metadata">

**Author:** ![ckjones](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/ckjones/32/1034_2.png) [@ckjones](https://forum.scylladb.com/u/ckjones)\
**Post date:** [July 24, 2024, 2:54pm UTC](https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342/3 "2024-07-24T14:54:00Z")

</div>

Hey Piotr, thanks for taking the time to reply! I do have one follow up question: is the driver keeping track of schema changes? It seems weird to me that the driver is notified of all schema changes, even if they may be related to a table/view that the driver is not using. Is there a reason why it needs to know everything that’s going on across the cluster?

---

<div class="post-metadata">

**Author:** ![sylwiaszunejko](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/sylwiaszunejko/32/714_2.png) [@sylwiaszunejko](https://forum.scylladb.com/u/sylwiaszunejko)\
**Post date:** [July 25, 2024, 10:06am UTC](https://forum.scylladb.com/t/why-do-my-clients-need-to-register-for-change-events/2342/4 "2024-07-25T10:06:55Z")

</div>

The driver is notified about all schema changes, but what it is doing this this information is different for every type of event. For most of them it just clears the information about schema for given keyspace (see: [gocql/events.go at master · scylladb/gocql · GitHub](https://github.com/scylladb/gocql/blob/master/events.go#L108-L125)). Only for `schemaChangeKeyspace` it does some additional work if `tokenAwarePolicy` is used (for other policies this is ignored).
