InfluxDB连接器无效的时间戳格式

时间:2019-04-01 08:18:13

标签: json apache-kafka timestamp mqtt influxdb

我在Kafka上具有以下InfluxDB连接器:

{
  "connector.class": "com.datamountaineer.streamreactor.connect.influx.InfluxSinkConnector",
  "connect.influx.db": "kafka",
  "topics": "TestJson",
  "tasks.max": "1",
  "connect.influx.kcql": "INSERT INTO TestJsonStation SELECT * FROM TestJson WITHTIMESTAMP TimeStamp",
  "connect.influx.url": "http://influxdb:8086",
  "value.converter.schema.registry.url": "http://localhost:8081",
  "value.converter": "io.confluent.connect.avro.AvroConverter",
  "key.converter": "io.confluent.connect.avro.AvroConverter",
  "key.converter.schema.registry.url": "http://localhost:8081"
}

由于mqtt消息中的时间戳格式错误,我遇到了此异常。

java.lang.IllegalArgumentException: 4/1/2019 10:05:31 AM is not a valid format for timestamp, expected 'yyyy-MM-DDTHH:mm:ss.SSSZ'

有没有办法解决? (我无法控制生成消息的库)

0 个答案:

没有答案