Git Product home page Git Product logo

Comments (4)

dekelmos avatar dekelmos commented on July 17, 2024 8

You can add your package under name. e.g:
transforms.SetSchemaName.schema.name=com.mysolution.MyClassName

from kafka-streams-examples.

jshin-usc avatar jshin-usc commented on July 17, 2024 3

@JanardhanVarikuti I was able to get the streams app working initially when reading from a single topic by just changing the avro schema file to have those default values: "name": "ConnectDefault" with "namespace": "io.confluent.connect.avro". So my generated class was just called ConnectDefault.java

In order to have multiple streams in the same application, you can use the Kafka SMT (Single Message Transforms) SetSchemaMetadata in each source connector config to set the schema names.

transforms=SetSchemaName
transforms.SetSchemaName.type=org.apache.kafka.connect.transforms.SetSchemaMetadata$Value
transforms.SetSchemaName.schema.name=MyClassName

This way you can use "name": "MyClassName" in the avro schema file. But since you cannot specify the namespace with SMT, you will need to put your streams app in the default package and omit the namespace in the avro schema files for your generated sources.

from kafka-streams-examples.

fjbsantiago avatar fjbsantiago commented on July 17, 2024 2

Guys, thank you. I love it when I found someone struggling for exactly the same thing.

I combined your examples @dekelmos and @jessicashin:

transforms=SetSchemaName
transforms.SetSchemaName.type=org.apache.kafka.connect.transforms.SetSchemaMetadata$Value
transforms.SetSchemaName.schema.name=com.mysolution.MyClassName

Thank you.

from kafka-streams-examples.

jay999123 avatar jay999123 commented on July 17, 2024

Hi @jessicashin , Is the above issue is resolved? If yes, could you please provide the solution?

from kafka-streams-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.