I expect mosquitto_sub should got the latest value sent from mosquitto_pub.
But seems it is not true, subscribe always got the value before latest update one.
Here is my test steps:
I start mosquitto_sub first:
mosquitto_sub: got value 5 (last good known, it's ok)
Then use mosquitto_pub to send value and check mosquitto_sub side:
mosquitto_pub: send value 1
mosquitto_sub: still got value 5
mosquitto_pub: send value 2
mosquitto_sub: got value 1
mosquitto_pub: send value 3
mosquitto_sub: got value 2
mosquitto_pub: send value 4
mosquitto_sub: got value 3
Here is the commands to reproduce this issue: (remember to change YOUR_API_KEY/YOUR_FEED_ID/YOUR_DATASTREAM to your setting)
The subscribe side:
$ mosquitto_sub -h api.cosm.com -t YOUR_API_KEY/v2/feeds/YOUR_FEED_ID/datastreams/YOUR_DATASTREAM.csv
The publish side:
$ for i in 0 1 2 3 4 5 6 7 8 9 10; do mosquitto_pub -h api.cosm.com -t YOUR_API_KEY/v2/feeds/YOUR_FEED_ID/datastreams/YOUR_DATASTREAM.csv -m "$i"; sleep 1; done
It's obviously the subscribe side does not show 10 0 1 2 3 4 5 6 7 8 9 10.
Below is what I got in my test:
2013-05-09T00:40:20.009034Z,10
2013-05-09T00:40:20.009034Z,10
2013-05-09T00:47:52.062114Z,1
2013-05-09T00:47:54.325130Z,2
2013-05-09T00:47:54.325130Z,2
2013-05-09T00:47:58.398895Z,4
2013-05-09T00:47:58.398895Z,4
2013-05-09T00:48:02.680777Z,6
2013-05-09T00:48:04.721811Z,7
2013-05-09T00:48:06.813412Z,8
2013-05-09T00:48:06.813412Z,8
2013-05-09T00:48:11.278083Z,10
最好通过邮寄Cosm支持来解决此问题,因为听起来这可能是最终的问题(可能是某些东西本应被缓存)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.