questdb/c-questdb-client

Repository files navigation

QuestDB - Client Library for Rust, C and C++

This library makes it easy to insert data into QuestDB.

This client library implements the QuestDB's variant of the InfluxDB Line Protocol (ILP) over HTTP and TCP.

When connecting to QuestDB over HTTP, the library will auto-detect the server's latest supported version and use it. Version 1 is compatible with the InfluxDB Database.

  • Implementation is in Rust, with no additional run-time or link-time dependencies on the C++ standard library or other libraries.
  • We ship both a static and a dynamic library.
  • The library exposes Rust, C11 and C++17 APIs.
  • The C++ API is a header-only wrapper over the C API.
  • This library also has separate Python bindings.

Inserting data into QuestDB can be done in several ways.

This library supports ILP/HTTP (default-recommended) and ILP/TCP (specific use cases).

ProtocolRecord Insertion ReportingData Insertion Performance
ILP/HTTPTransaction-level (on flush)Excellent
ILP/TCPErrors in logs; Disconnect on errorBest (tolerates higher-latency networks)
CSV Upload via HTTPConfigurableVery Good
PostgreSQLTransaction-levelGood

Server errors are only reported back to the client for ILP/HTTP. See the flush troubleshooting docs for more details on how to debug ILP/TCP.

For an overview and code examples, see the Ingestion overview page of the developer docs.

To understand the protocol in more depth, consult the protocol reference docs.

The library supports the following ILP protocol versions.

These protocol versions are supported over both HTTP and TCP.

If you use HTTP, the library will automatically detect the server's latest supported protocol version and use it. If you use TCP, you can specify the protocol_version=N parameter when constructing the Sender object.

VersionDescriptionServer Comatibility
1Over HTTP it's compatible InfluxDB Line Protocol (ILP)All QuestDB versions
264-bit floats sent as binary, adds n-dimentional arrays8.4.0+ (2023-10-30)

To get started, read the language-specific guides.

C

C++

Rust

Python

If you need help, have additional questions or want to provide feedback, you may find us on our Community Forum.

You can also sign up to our mailing list to get notified of new releases.

The code is released under the Apache License.