-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JSONSchema while producing message #919
Support JSONSchema while producing message #919
Conversation
hi @txs4444 ! |
hi @tchiotludo, Yes, sure. Let me know if you need some help while testing this. |
First try seems to works quite well :
Seems to be good work here. Just the unit test failed, all the count is wrong since you have added a topic, can you fix it ? |
Sure, I'll fix them. Although it make take a while. When I build it locally only one test fails.
I have to find what does make the difference here. |
look at here : https://github.com/tchiotludo/akhq/runs/4423640449?check_suite_focus=true |
RecordRepositoryTest#produceAndConsumeRecordUsingJsonSchema created a topic while producing a message, this influenced the other tests because number of topic was different depending on the test order. Now topic for this test is created in KafkaTestCluster to have always the same number of topic for each test regardless of the test order.
I fix some of the test - I hope all. You see it's hard because the test result depends on the test order - my Could you please run the checks again? I'm feeling kind of blind because the tests passes locally but it is not necessary true for the checks on github. |
@txs4444, I know some kind of tricky this part ... |
And it's merged, thanks a lot :) |
@tchiotludo I have some vague idea how to improve the tests a little bit. I’ll post it when I have some time to work on it and check if it makes sense. Thanks for the testing :) |
Currently it is not possible to produce message to a topic while JSON Schema is chosen as key or value schema.
For producing message to a topic
RecordRepository
is used. In case schema id was presentAvroSchemaSerializer
was used regardless of schema type.RecordWithSchemaSerializerFactory
was introduced to take care of fetching schema from schema registry and create proper serializer. AvroSerializer is no longer responsible for fetching schema itself - it is not longer a bean but it is created on demand for specific schema.A test not related to the functionality (
SchemaRegistryRepositoryTest#register
) was change because it was influenced by adding schema to schema registry by newRecordRepositoryTest