4.0.0
Features
This release introduces a number of changes, including major new features and a few breaking changes in the Rust, C and C++ APIs.
Introduction of ILP over HTTP Support
The library now supports InfluxDB Line Protocol (ILP) over HTTP in addition to the existing TCP protocol.
- ILP/HTTP allows for better error feedback and control over transactions and is the recommended for both existing and new users.
- ILP/HTTP introduces basic (username/password) and token (bearer) authentication.
// C++
auto sender = questdb::ingress::sender::from_conf("http::addr=localhost:9000;token=auth_token;");
Configuration via String or Environment Variable
Users can now configure the client by passing a configuration string or via an environment variable (QDB_CLIENT_CONF
). This provides a more flexible and convenient way to configure the client. This new approach is being adopted for all our client libraries.
// Rust
let sender = Sender::from_conf("tcp::addr=localhost:9009;")?
The builder/opts APIs remain available.
Transaction Support
The library introduces transactional flushes for ILP over HTTP, allowing users to ensure that all rows in a flush request refer to the same table, treating the request as a single transaction. This feature is allows for use cases where ingestion atomicity is required.
Reliability Enhancements
The ILP over HTTP implementation includes features like configurable request timeouts, retry mechanisms, and minimum expected throughput settings to improve the performance and reliability of data transmission.
Buffer Row Count
You can ask the buffer how many rows it has recorded by calling its .row_count()
method.
Breaking Changes
.connect()
renamed to .build()
When using the builder/opts API, the connect
method has been renamed to build
.
This is because when connecting via HTTP, the connection to the database is made lazily at the first flush.
TCP Auth API Changes
The ILP/TCP .auth(username, token, token_x, token_y)
method which took for parameters has been expanded to four different settings.
From conf:
// Rust
let sender = Sender::from_conf("tcps::addr=localhost:9009;username=u;token=t;token_x=x;token_y=y;");
Programmatically:
// Rust
let sender = SenderBuilder::new(Protocol::Tcps, "localhost", 9009)
.username("u")?
.token("t")?
.token_x("x")?
.token_y("y")?
.build()?;
TLS configuration parameters
The .tls(...)
API has been removed and replaced with:
tls_ca
which takes an enum (webpki, os, webpki+os, pem_file)tls_roots
replaces the oldtls_ca
API.tls_verify(false)
replaces the olderinsecure_skip_verify
API.
net_interface
-> bind_interface
The TCP-only setting for binding the outbound network interface has been renamed to bind_interface
.
This feature is no longer available when using HTTP. Raise an issue if this is something you require.
Full changelog: 3.1.0...4.0.0