I have a lot of code written using the InfluxDB Java Client, but want to migrate my database to QuestDB without having to change my code. The InfluxDB client libraries use HTTP as a transport method and InfluxDB Line Protocol (ILP) as a serialization format, but QuestDB uses TCP for transport. So out-of-the-box, the client is incompatible with QuestDB, even though they both support ILP.
How can I get my data into QuestDB without changing any of my code?
To reuse any code written using InfluxDB libraries, you need a component to translate HTTP requests into TCP. Luckily, there's Telegraf which can do this for us!
You need to set up Telegraf as a middleman in between your InfluxDB client and QuestDB. Here is a
telegraf.confthat is set up with an InfluxDB input and QuestDB output:There is a working example on Github here and this is also described more in a QuestDB issue