Updated on 2023-10-10 GMT+08:00

Appendix: Restrictions on Spring Kafka Interconnection

Overview

Spring Kafka is compatible with open-source Kafka clients. For details about the version mapping between Spring Kafka and open-source Kafka clients, see the Spring official website. Spring Kafka is mainly compatible with Kafka client 2.x.x, whereas the Kafka server version used by ROMA Connect MQS is 1.1.0 or 2.7. Therefore, when Spring Kafka is used to connect to ROMA Connect in the Spring Boot project, ensure that the Kafka client version is the same as the Kafka server version.

If the ROMA Connect instance connected to Spring Kafka uses Kafka 1.1.0, most functions can be used, and only a few new functions are not supported. If you encounter problems not listed in the following, submit a service ticket to contact technical support. The following lists the functions that are not supported:

Unsupported zstd Compression Type

Kafka 2.1.0 supports the zstd compression type, but the Kafka server in version 1.1.0 does not support.

  • Configuration file:

    src/main/resources/application.yml

  • Configuration item:
    spring:
      kafka:
        producer:
          compression-type: xxx
  • Restriction:

    Do not set compression-type to zstd.

Static Members Not Supported for Consumers

The parameter group.instance.id is added to the Kafka client in version 2.3. Consumers with this ID are considered as static members.

  • Configuration file:

    src/main/resources/application.yml

  • Configuration item:
    spring:
      kafka:
        consumer:
          properties:
            group.instance.id: xxx
  • Restriction:

    Do not add the group.instance.id parameter.