Reliability of REST-Polling

Hallo there,

I am working on a project which, in regular intervals, polls new tasks from a camunda engine.
My approach is to set a timestamp to whenever I send a request and then send the next request with a createdAfter “myTimestamp”. This should - theoretically - result in me never polling any duplicates and getting all newly created tasks.

I am, however, not sure if this actually works the way i think it does. My concern is that camunda might set the timestamp of the task-creation and then persist it with the next execution or batch of transactions, thus making the task available to my REST-polling way after it was actually created. In that case the task would be missed completely if my poll were to happen in this interval.

Is this a valid concern? Or can i assume safely, that a task that was created at time X will be available at time X? And if not, what would be a sensitive margin of error?

I would also be grateful for any hints towards documentation regarding this.

Many thanks,