Skip to content

questdb/c-questdb-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

135 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c-questdb-client

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, and the QuestDB Wire Protocol (QWP) over UDP for high-throughput ingestion on trusted networks.

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.

Insertion Protocols Overview

Inserting data into QuestDB can be done in several ways.

This library supports three ingestion transports:

  • ILP/HTTP (default-recommended): request-response, server errors returned to the client, supports authentication and TLS.
  • ILP/TCP: streaming, legacy; errors cause disconnect and surface only in server logs.
  • QWP/UDP: best-effort datagram transport for high-throughput ingestion on trusted networks; no acknowledgements, no authentication, no TLS.
Protocol Record Insertion Reporting Data Insertion Performance
ILP/HTTP Transaction-level (on flush) Excellent
ILP/TCP Errors in logs; Disconnect on error Best (tolerates higher-latency networks)
QWP/UDP None (best-effort, unacknowledged) Best (lowest overhead; datagrams may be dropped)
CSV Upload via HTTP Configurable Very Good
PostgreSQL Transaction-level Good

Server errors are reported back to the client only for ILP/HTTP. ILP/TCP surfaces errors via server-side disconnect; QWP/UDP has no error-reporting path at all. See the flush troubleshooting docs for more details on how to debug ILP/TCP and QWP/UDP.

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.

Protocol Versions

The library supports the following ILP protocol versions. These apply to ILP/HTTP and ILP/TCP only — QWP/UDP uses its own wire format and is not versioned through this mechanism.

  • If you use HTTP and protocol_version=auto or unset, the library will automatically detect the server's latest supported protocol version and use it (recommended).
  • If you use TCP, you can specify the protocol_version=N parameter when constructing the Sender object (TCP defaults to protocol_version=1).
Version Description Server Compatibility
1 Over HTTP it's compatible with InfluxDB Line Protocol (ILP) All QuestDB versions
2 64-bit floats sent as binary, adds n-dimensional arrays 9.0.0+ (2025-07-11)

Getting Started

To get started, read the language-specific guides.

C

C++

Rust

Python

Further Topics

Community

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.

License

The code is released under the Apache License.

About

Rust, C and C++ client for QuestDB InfluxDB Line Protocol

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors