In general, are zedtokens just a
# spicedb
d
In general, are zedtokens just a timestamp? So if I have a service that is consuming the watch API, I just have to keep track of the latest zedtoken returned from the watch api and that will reset me back to that time in the case of a crash?
v
It depends on the datastore, but generally it's a timestamp. And yes, the general rule of thumb with Watch API is to keep track of the last processed zedtoken and make your service idempotent, in the case where the changes for a zedtoken have been processed by your application but the zedtoken hasn't been recorded (e.g. involves a dual-write to two different systems of record)
d
Ah perfect! Thank you!
2 Views