-
Hello and thank you for all the hard work on this library! I'd like to use it in an async project. Its a web server that accepts some payload and then forwards it to Kafka using Avro. In my code I have a The problem I'm running into is that Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I still have not build a full async app to test the usability in that case so it could be there is room for improvement. However you should not create a new encoder for each request, as it will cause the need for a call to schema registry each time. The problem is you need the correct ID from schema registry, even if you supply a schema. From a theoratic view there seem at least two options:
I hope this helps somewhat. I might add some example app some point, I think it might be useful. |
Beta Was this translation helpful? Give feedback.
-
I will think about it, the cache is one of the most usefull/complex bits. It's also the only place that needs mutability. So decoupling might make some things easier in the end. For context, the library has grown from just a passion project trying to do the same thing with Rust, as I was doing with Rust. I'm not using it myself at the moment, and try to keep it compatible with the Java client if needed, but don't feel like doing much more for it. If you want to work on it, you could create an issue and pr for it. |
Beta Was this translation helpful? Give feedback.
I still have not build a full async app to test the usability in that case so it could be there is room for improvement.
However you should not create a new encoder for each request, as it will cause the need for a call to schema registry each time. The problem is you need the correct ID from schema registry, even if you supply a schema.
From a theoratic view there seem at least two options: