Skip to content

Releases: influxdata/influxdb-client-java

8.0.0

Choose a tag to compare

@bednar bednar released this 23 Apr 04:58

⚠️ The spring module now targets Spring Boot 4.x. Applications using com.influxdb:influxdb-client-java-spring should upgrade to Spring Boot 4.x.

Features

  • #850: Update the Spring health indicator integration to use the Spring Boot 4 health APIs.

Bug Fixes

  1. #856: with InfluxQL queries parse escaped special characters in tag keys and values e.g. ("my_data,model\,\ uin=Droid\,\ C3PO ...")

Dependencies

Update dependencies:

Build:

  • #850: spring-boot to 4.0.1

CI

  1. #867: Set up auto-merge for Dependabot PRs.

6.10.2

Choose a tag to compare

@bednar bednar released this 30 Mar 04:27

Bug Fixes

  1. #864: Correct tags parsing.
    • Previous hot fix 6.10.1 used incorrect escapes in testing tag keys and values.
    • This fix...
      • Uses correctly escaped keys and values
      • Updates the tags parser in InfluxQLQueryAPI to handle them correctly

6.10.1

Choose a tag to compare

@bednar bednar released this 25 Mar 14:27

Bug Fixes

  1. #862: Improved tags parsing.
    • Supports InfluxQL queries involving tag keys and values that incorporate escaped special characters such as commas. e.g. ("my_data,model\,\ uin=Droid\,\ C3PO ...")
    • This support is stable for InfluxDB Enterprise v1.x databases and InfluxDB v2.x databases using legacy v1 query contexts - e.g (/query?db=test_data).
    • Influxdb OSS v1.x uses slightly different escape semantics. Use of escaped commas or spaces in tag keys and values with this database can lead to unexpected behavior. Support for special tags with OSS 1.x is not included with this hotfix release.

7.5.0

Choose a tag to compare

@bednar bednar released this 13 Jan 10:24

Features

  • #828: Add read-only getters for Point.fields and Point.tags

7.4.0

Choose a tag to compare

@bednar bednar released this 18 Nov 14:17

Features

  • #848: new WriteOption config for capturing backpressure data

7.3.0

Choose a tag to compare

@bednar bednar released this 22 May 08:21

Features

  • #821: Prevent duplicate interceptors in OkHttpClient builder

Dependencies

⚠️ Important Notice: Starting from this release, we won’t be listing every dependency change in our changelog. This helps us maintain the project faster and focus on important features for our InfluxDB client.

7.2.0

Choose a tag to compare

@bednar bednar released this 12 Aug 07:42

Features

  • #745: New example WriteHttpExceptionHandled.java showing how to make use of InfluxException.headers() when HTTP Errors are returned from server. Also, now writes selected headers to client log.
  • #719: InfluxQLQueryService header changes.
    • Accept header can now be defined when making InfluxQLQuery calls. Supoorted MIME types:
      • application/csv
      • application/json
    • The value application/csv remains the default.
    • ⚠️ Side effects of these changes:
      • When using application/json, timestamp fields are returned in the RFC3339 format unless InfluxQLQuery.setPrecision() has been previously called, in which case they are returned in the POSIX epoch format.
      • When using application/csv, timestamp fields are returned in the POSIX epoch format.
    • Convenience methods have been added to InfluxQLQueryAPI to simplify expressly specifying JSON or CSV calls.
    • Epoch timestamps can also be ensured by calling InfluxQLQuery.setPrecision() before executing a query call.
    • An AcceptHeader field has also been added to the InfluxQLQuery class and can be set with InfluxQLQuery.setAcceptHeader().
    • More information from the server side:
    • See the updated InfluxQLExample

Bug Fixes

  1. #744 following an InfluxQLQueryAPI.query() call, empty results from the server no longer result in a null result value.

Dependencies

Update dependencies:

Build:

  • #753: spring-boot to 3.3.2
  • #726: kotlin to 2.0.0
  • #752: micrometer-registry-influx to 1.13.2
  • #749: kotlin-coroutines to 1.8.1
  • #735: scala-collection-compat_2.12 to 2.12.0
  • #740: pekko to 1.0.3
  • #741: commons-csv to 1.11.0
  • #743: gson to 2.11.0

Maven:

  • #721: build-helper-maven-plugin to 3.6.0
  • #728: maven-source-plugin to 3.3.1
  • #729: maven-enforcer-plugin to 3.5.0
  • #730: scala-maven-plugin to 4.9.1
  • #734: maven-compiler-plugin to 3.13.0
  • #736: jacoco-maven-plugin to 0.8.12
  • #748: maven-surefire-plugin, maven-failsafe-plugin to 3.3.1
  • #746: maven-jar-plugin to 3.4.2
  • #747: maven-project-info-reports-plugin to 3.6.2
  • #751: license-maven-plugin to 4.5

Test:

  • #724: assertj to 3.26.0
  • #725: assertk-jvm to 0.28.1
  • #750: assertj-core to 3.26.3
  • #737: junit-jupiter to 5.10.3
  • #754: hamcrest to 3.0

Examples:

  • #723: commons-cli to 1.8.0
  • #742: commons-io to 2.16.1

7.1.0

Choose a tag to compare

@bednar bednar released this 17 May 09:25

Bug Fixes

  1. #684: Fix checking for CSV end of table marker when parsing CSV stream to InfluxQLQueryResult, needed for example when parsing the results of a query like "SHOW SERIES".
  2. #662: Adds to FluxDsl support for the |> elapsed(unit) function.
  3. #623: Enables the use of IPv6 addresses.
  4. #604: Custom FluxDSL restrictions for regular expressions

Dependencies

Update dependencies:

Build:

  • #716: karaf to 4.4.6
  • #710: spring-boot to 3.2.5
  • #686: scala-library to 2.12.19
  • #690: kotlinx-coroutines to 1.8.0
  • #707: micrometer-registry-influx to 1.12.5
  • #696: okio to 3.9.0
  • #694: retrofit to 2.11.0
  • #699: kotlin to 1.9.23
  • #701: lombok to 1.18.32
  • #702: commons-io to 2.16.0

Maven:

  • #676: maven-compiler-plugin to 3.12.1
  • #677: maven-surefire-plugin, maven-failsafe-plugin to 3.2.5
  • #679: build-helper-maven-plugin to 3.5.0
  • #682: maven-checkstyle-plugin to 3.3.1
  • #712: maven-gpg-plugin to 3.2.4
  • #703: dokka-maven-plugin to 1.9.20
  • #713: maven-jar-plugin to 3.4.1
  • #709: scala-maven-plugin to 4.9.0
  • #708: maven-deploy-plugin to 3.1.2

Test:

  • #683: assertj to 3.25.3
  • #687: junit-jupiter to 5.10.2
  • #714: logback-classic to 1.5.6

Provided:

  • #711: slf4j-api to 2.0.13

Examples:

  • #715: commons-cli to 1.7.0

7.0.0

Choose a tag to compare

@bednar bednar released this 30 Jan 08:25

⚠️ This client version discontinues support for JDK 8 and 11. The minimum supported JDK version is now JDK 17.

⚠️ This client version discontinues support for Akka Streams and introduces support for Pekko Streams instead. Apache Pekko is a fork of Akka 2.6.x, created after the Akka project adopted the Business Source License, which is not compatible with open-source usage.

Features

  1. #661: Replaced Akka Streams with Pekko Streams in the Scala client.
  2. #673: Upgrade SpringBoot to v3 and Spring to v6
  3. #673: Disable support for old JDKs (< 17)

Dependencies

Update dependencies:

Build:

  • #664: kotlin to 1.9.22
  • #666: okio to 3.7.0
  • #667: rxjava to 3.1.8
  • #669: commons-lang3 to 3.14.0
  • #670: micrometer-registry-influx to 1.12.1
  • #673: spring-boot to 3.2.2
  • #673: spring to 6.1.3
  • #673: scala-library to 2.13.11
  • #673: okhttp to 4.12.0

Maven:

  • #671: maven-javadoc-plugin to 3.6.3

Test:

  • #668: junit-jupiter to 5.10.1

6.12.0

Choose a tag to compare

@bednar bednar released this 15 Dec 08:33

Features

  1. #643: ConnectionClosingInterceptor interceptor closes connections that exceed
    a specified maximum lifetime age (TTL). It's beneficial for scenarios where your application requires establishing new connections to the same host after
    a predetermined interval.

The connection to the InfluxDB Enterprise with the ConnectionClosingInterceptor can be configured as follows:

package example;

import java.time.Duration;
import java.util.Collections;

import okhttp3.OkHttpClient;
import okhttp3.Protocol;

import com.influxdb.client.InfluxDBClient;
import com.influxdb.client.InfluxDBClientFactory;
import com.influxdb.client.InfluxDBClientOptions;
import com.influxdb.client.domain.WriteConsistency;
import com.influxdb.rest.ConnectionClosingInterceptor;

public class InfluxQLExample {

    public static void main(final String[] args) throws InterruptedException {

        //
        // Credentials to connect to InfluxDB Enterprise
        //
        String url = "https://localhost:8086";
        String username = "admin";
        String password = "password";
        String database = "database";
        WriteConsistency consistency = WriteConsistency.ALL;

        //
        // Configure underlying HTTP client
        //
        OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder()
                .protocols(Collections.singletonList(Protocol.HTTP_1_1));

        //
        // Use new Connection TTL feature
        //
        Duration connectionMaxAge = Duration.ofMinutes(1);
        ConnectionClosingInterceptor interceptor = new ConnectionClosingInterceptor(connectionMaxAge);
        okHttpClientBuilder
                .addNetworkInterceptor(interceptor)
                .eventListenerFactory(call -> interceptor);

        //
        // Configure InfluxDB client
        //
        InfluxDBClientOptions.Builder optionsBuilder = InfluxDBClientOptions.builder()
                .url(url)
                .org("-")
                .authenticateToken(String.format("%s:%s", username, password).toCharArray())
                .bucket(String.format("%s/%s", database, ""))
                .consistency(consistency)
                .okHttpClient(okHttpClientBuilder);

        //
        // Create client and write data
        //
        try (InfluxDBClient client = InfluxDBClientFactory.create(optionsBuilder.build())) {

            // ...
        }
    }
}