tulios / kafkajs

A modern Apache Kafka client for node.js
https://kafka.js.org
MIT License
3.7k stars 521 forks source link

Is it possible to consume a topic with multiple schemas ? #1680

Open houdheyfa opened 4 months ago

houdheyfa commented 4 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is.

Describe the solution you'd like A clear and concise description of what you want to happen. Please include links to other clients' solutions and/or KIPs for Kafka features if applicable.

Additional context Add any other context or screenshots about the feature request here.

MohitVachhani commented 3 months ago

Multiple schema as in ?

Let us assume 2 schemas


interface User {
  id: string
  name: string
}

interface Employee {
 id: string
 userId: string
 companyId: string
}

Now you can receive the message of the above both types in the same topic and no issues will be faced. Kafka is just a message broker and nothing more so schema usually doesn't matter....

Do let me know if anything more is here for discussion.