Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

startAfterTime not working as expected #42

Closed
beneuto opened this issue Oct 16, 2017 · 1 comment
Closed

startAfterTime not working as expected #42

beneuto opened this issue Oct 16, 2017 · 1 comment

Comments

@beneuto
Copy link

beneuto commented Oct 16, 2017

I am storing the iothub annotations in my database with the data. To resume processing where it left of I am querying the database to get the latest enqueuedtime processed and setting this time as the startaftertime parameter. Something like the code below.

However when I run this, the last processed record is re-read from IoT Hub. I have also tried adding 1 millisecond to starttime and it still re-reads the last record. Through the process of elimination I found that adding 1930 milliseconds to starttime (iottime.getTime()+1930) is the point where the last processed record is no longer read.

var iottime = new Date(result.payload[0]["iothub-enqueuedtime"]);
var starttime = iottime.getTime();


... client.createReceiver('blah', partitionId, { 'startAfterTime': starttime }) ...
@beneuto
Copy link
Author

beneuto commented Apr 16, 2018

Looks like the "x-opt-enqueued-time" property is what is required for this to work (not "iothub-enqueuedtime").

@beneuto beneuto closed this as completed Apr 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant