Flaxoos / extra-ktor-plugins

Feature-rich, efficient, and highly customizable plugins for your Multiplatform Ktor Server or Client
https://flaxoos.github.io/extra-ktor-plugins/
Other
52 stars 2 forks source link

Subject for new Avro schema #32

Closed diegopatinor closed 2 days ago

diegopatinor commented 3 weeks ago

Hello, I need to send various types of messages on the same topic (User Created, User Updated, User Deleted for example), but the schema registration always uses the subject TopicName(value=my-topic)-value. This prevents me from registering multiple schemas for the same topic.

ERROR: Failed registering schema to schema registry at http://localhost:8081/subjects/TopicName(value=my-topic)-value/versions:
409 Conflict {\"error_code\":409,\"message\":\"Schema being registered is incompatible with an earlier schema for subject \\\"TopicName(value=my-topic)-value

From what I see, this is hardcoded at Avro.kt line 70. Could the subject be registered as topicName.AvroSchemaName as other implementations do, allowing multiple schemas related to the same topic to be registered?

Regards!

Flaxoos commented 1 week ago

I did, I thought you’re going to add a test for this?

On Fri, 21 Jun 2024 at 21:37, Diego Patiño @.***> wrote:

Hi @Flaxoos https://github.com/Flaxoos, have you looked at this?

— Reply to this email directly, view it on GitHub https://github.com/Flaxoos/extra-ktor-plugins/issues/32#issuecomment-2183345198, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACONQJROIJ4NMSXHCAQDHQTZIR6HLAVCNFSM6AAAAABJJNHA2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGM2DKMJZHA . You are receiving this because you were mentioned.Message ID: @.***>

diegopatinor commented 1 week ago

Yes, sorry, I didn't see the comment. The test was added.