Search code examples
mavenavrospring-cloud-streamjackson-dataformat-avro

Missing AvroSchemaMessageConverter class in spring-cloud-stream-schema - 1.2.0.RC1


I am missing AvroSchemaMessageConverter class in spring-cloud-stream-schema - 1.2.0.RC1. I want through this link Missing schema module for spring-cloud-stream.

  <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-stream-schema</artifactId>
    <version>1.2.0.RC1</version>
  </dependency>

When I looked at the pom.xml, I was anticipating the class AvroSchemaMessageConverter.java will be available in spring-cloud-stream-1.2.0.RC1.jar. But it does not exist as per the picture below:

Eclipse Spring dependencies

Can someone point to the dependency I am missing. My maven dependencies for spring-cloud-stream to post to Kafka topics.

    <dependencyManagement>
      <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Dalston.RC1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
      </dependencies>
    </dependencyManagement>
    <dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-stream-kafka</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-binder-kafka</artifactId>
        <exclusions>
          <exclusion>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.11</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
    <!-- Apache avro serialization support  -->
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-schema</artifactId>
    </dependency>
    </dependencies>

Solution

  • It's in the schema jar:

    <!-- Apache avro serialization support  -->
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream-schema</artifactId>
    </dependency>
    

    Notice the full hierarchy of that GitHub Artifact...

    spring-cloud-stream/spring-cloud-stream-schema/src/main/java/org/springframework/cloud/stream/schema/avro/AvroSchemaMessageConverter.java