kqkdChen opened a new issue #1442:
URL: https://github.com/apache/incubator-iotdb/issues/1442

   使用 python paho mqtt 插入数据时出现错误:
   qos=1 or 2, 则会出现如下错误,结果就是预期应该插入10W条数据的结果只插入了20条数据
   iotdb version: 0.10.0
   paho-mqtt: 1.5.0
   import random
   import paho.mqtt.client as mqtt
   import time
   def on_connect(client, userdata, flags, rc):
       print("Connected with result code: " + str(rc))
   def on_message(client, userdata, msg):
       print(msg.topic + " " + str(msg.payload))
   client = mqtt.Client(client_id=str(random.uniform(1, 10)))
   # client = mqtt.Client()
   client.username_pw_set("root", "root")
   client.connect('', 1883)
   timestamp = lambda: int(round(time.time() * 1000))
   for i in range(100000):
       message = "{\n" "\"device\":\"root.log.d1\",\n" "\"timestamp\":%d,\n" 
"\"measurements\":[\"s1\"],\n" "\"values" \
                 "\":[%f]\n" "}" % (timestamp() + 1000 * i, random.uniform(1, 
       client.publish('root.log.d1.info', payload=message, qos=0, retain=False)

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Reply via email to