Improve Your Producers Efficiency With This Powerful Calculator
Go
LogoLogo
WebsiteStart FreeSuperstream Console
  • Superstream
  • Getting started
    • Option 1: BYOC
      • Step 1: Agent Deployment
      • Step 2: Create a Kafka user
      • Step 3: Connect your Kafka cluster/s
      • Step 4: Activate
      • Additional resources
        • Engine deployment
          • Supertstream Engine Deployment using existing secrets
          • How to deploy and manage Superstream using ArgoCD
          • Superstream Engine deployment for environments with a local container registry
          • Supertstream Engine Deployment using custom resource limits
          • Superstream Platform deployment for Air-Gapped environments
        • Engine upgrade
          • Upgrading From Helmfile based Deployment to Superstream Helm Chart
    • Option 2: Fully managed
      • Step 1: Create a Kafka user
      • Step 2: Connect your Kafka cluster/s
      • Step 3: Activate
  • Optimizations
    • Improve Network Efficiency
    • Resize AWS MSK Size
  • Settings
    • Notifications
  • Security & Legal
    • Processed data
    • Compliance
    • Firewall rules
    • Authentication
    • Legal
      • Terms and Conditions
      • Privacy Policy
  • Solution briefs
    • Superstream for Confluent Platform
    • Superstream for Confluent Cloud
    • Superstream for Redpanda
    • Superstream for Apache Kafka
    • Superstream for AWS MSK
    • Superstream for AWS MSK Serverless
    • Superstream for Aiven
  • Release notes
    • Changelog
      • Feb 2, 2025
      • Jan 11, 2025
      • Dec 5, 2024
      • Nov 1, 2024
      • Oct 14, 2024
      • Sep 24, 2024
      • Sep 10, 2024
      • August 26, 2024
Powered by GitBook
LogoLogo

Product

  • Superstream Console

Copyright to Superstream Labs Inc. 2025

On this page
  • General guidelines
  • Replacement example

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting started
  2. Step 4: Connect Your Clients

Java

General guidelines

  • Superstream dependency is a replacement for kafka-clients dependency.

  • No other kafka-clients dependency should run concurrently with the Superstem dependency. The Superstem dependency must be the sole kafka-clients dependency used across different packages in the same pom.xml file.

Replacement example

  • Let's assume that your application is using both spring-kafka and kafka-streams packages.

  • Your pom.xml should look similar to this:

<dependencies>
    <dependency>
        <groupId>org.springframework.kafka</groupId>
        <artifactId>spring-kafka</artifactId>
        <version>2.8.4</version>
    </dependency>

    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>3.5.1</version> <!-- Replace with the desired version -->
    </dependency>
</dependencies>
  • Both packages are using kafka-clients as an internal dependency. We need to exclude it.

<dependencies>
    <dependency>
        <groupId>org.springframework.kafka</groupId>
        <artifactId>spring-kafka</artifactId>
        <version>2.8.4</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>3.5.1</version> <!-- Replace with the desired version -->
        <exclusions>
            <exclusion>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>
  • Now, you just need to add the right Superstream dependency based on the version you are currently using

<dependencies>
    <dependency>
        <groupId>org.springframework.kafka</groupId>
        <artifactId>spring-kafka</artifactId>
        <version>2.8.4</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>3.5.1</version> <!-- Replace with the desired version -->
        <exclusions>
            <exclusion>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    
    <dependency>
        <groupId>ai.superstream</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>3.5.14</version><!-- Replace with the desired version -->
    </dependency>
</dependencies>

A list of all the known packages that are using kafka-clients and requires exclusion

  • Kafka Streams

  • Kafka Connect

  • Confluent Schema Registry Client

  • Confluent Kafka REST

  • Confluent Kafka Avro Serializer/Deserializer

  • Spring Kafka

  • Apache Flink Kafka Connector

  • Apache Camel Kafka Component

  • Akka Streams Kafka

  • Kafka Clients

Last updated 9 months ago

Was this helpful?