I am using the streaming API in python via the tweepy client. https://dev.twitter.com/streaming/overview/messages-types#limit_notices describes LIMIT notices as:
Limit notices contain a total count of the number of undelivered Tweets since the connection was opened …
However, they appear to arrive out of order, with the counts going up and down. Based on documentation cited above, I expected the total counts to be increasing monotonically within the scope of a given connection. This makes me wonder whether the documentation is incorrect.
Below is an example of the LIMIT notices that my app received recently, listed in the order that they were received within a single connection cycle. Should I interpret these LIMIT notices by ignoring the order and extracting the max value to determine the total undelivered tweet count since the stream connection was opened as the twitter documentation would seem to suggest - 112 in this case - or should I be adding them up (1 + 4 + 8 + 6 + 10 + 11 + 4 + etc.)?
2015-04-14 17:04:07,578 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 1}}
2015-04-14 17:04:07,589 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 4}}
2015-04-14 17:04:15,379 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 8}}
2015-04-14 17:04:19,289 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 6}}
2015-04-14 17:04:19,358 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 10}}
2015-04-14 17:04:19,359 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 11}}
2015-04-14 17:04:19,360 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 4}}
2015-04-14 17:04:23,166 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 15}}
2015-04-14 17:04:24,239 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 44}}
2015-04-14 17:04:25,249 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 46}}
2015-04-14 17:04:27,140 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 39}}
2015-04-14 17:04:27,140 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 42}}
2015-04-14 17:04:27,164 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 51}}
2015-04-14 17:04:27,164 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 56}}
2015-04-14 17:04:27,165 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 59}}
2015-04-14 17:04:27,176 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 53}}
2015-04-14 17:04:28,681 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 63}}
2015-04-14 17:04:28,682 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 64}}
2015-04-14 17:04:28,684 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 71}}
2015-04-14 17:04:28,685 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 63}}
2015-04-14 17:04:29,720 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 67}}
2015-04-14 17:04:29,721 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 81}}
2015-04-14 17:04:29,722 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 69}}
2015-04-14 17:04:29,724 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 70}}
2015-04-14 17:04:31,552 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 68}}
2015-04-14 17:04:31,553 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 72}}
2015-04-14 17:04:32,979 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 79}}
2015-04-14 17:04:32,979 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 97}}
2015-04-14 17:04:32,981 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 87}}
2015-04-14 17:04:32,982 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 81}}
2015-04-14 17:04:33,003 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 88}}
2015-04-14 17:04:33,003 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 91}}
2015-04-14 17:04:33,003 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 102}}
2015-04-14 17:04:34,503 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 82}}
2015-04-14 17:04:34,533 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 110}}
2015-04-14 17:04:34,534 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 98}}
2015-04-14 17:04:34,534 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 87}}
2015-04-14 17:04:34,536 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 101}}
2015-04-14 17:04:36,831 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 108}}
2015-04-14 17:04:36,831 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 112}}
2015-04-14 17:04:36,831 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 112}}
2015-04-14 17:04:41,989 - twitter_direct_agent(23230) - WARNING - Received Twitter LIMIT message={u’limit’: {u’track’: 90}}