Is it possible to check existence of persistent entity by it's id?

Hello.

I have a persistent entity, and in my use-case I need to handle a lot of requests with ID that do NOT represent an existing entity.

There are millions of entities with unique ID. And just about 0.01 % of regular IDs are managed by my application and have a persistent entity instance in a DB. So I’m looking for the best way how to check if an ID represents an existing entity (managed by my app). So in this case I do not need to restore the whole entity from DB from snapshot and events. I just want to check if the ID is ours or not.

Is there a low-level API to just check the ID? True/False response is ok in the use case. Or, what is your architecture recommendation on handling such cases?

Thanks,
Libor

PS: I use AWS Keyspaces DB.

Public API specifically for that no. Best solution would probably be to do your own query against the database journal table for just the existence of any event for a given persistence id.