I’m trying to find a solution of the following problem. I will describe it in details
I have to process mentions for one Twitter account. Every message - is a votes. And I should process all of them without loss data (but in specific time interval)
Regarding this paragraph https://dev.twitter.com/docs/streaming-apis/processing#Message_ordering
"messages are not delivered in sorted order"
I have a connection (User Streams), which started receive the following tweets IDs
And let’s suppose that we lost connection after the processing "x15"
after the re-connection, we will continue receive only new tweets like this
So, the problem is in that, that how to read ALL unprocessed tweets from the interval when connection was lost?
Yes, we should use method statuses/mentions_timeline and I have to provide since_id, max_id
How we can correctly define those values?
In sample above since_id=“x15”, and max_id=“x21” (it is the first tweet from just connected stream)
but it is not correct and in case since_id=“x15” we will lose tweets “x11”, "x12"
and in case max_id=“x21” - we will lose tweets “x22”,“x23”,"x24"
Yes, I can take since_id=“x15”-100 and max_id=“x21”+100 - but in this case I have to store tweets and check if they were processed or not
But I would like to avoid storing processed tweet IDs
Is there any other solution of this problem?