-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Issue]: Trouble with using Apicurio Schema Registry + Confluent SerDes #389
Comments
Thank you for collaborating with the project by giving us feedback! In case it applies, it would be helpful if you could attach an example AVRO and an example test plan for us to reproduce the error. Cheers! |
Thanks for collaborating with us, I will take a look at it and contact you as soon as we have a solution. |
Hi, is there any progress with this problem? Thanks :) |
Hi @CROprogrammer currently I am testing a solution in the branch attached, if you want you can test it yourself. We check a missing strategies from Apicurio which could solve your problem, but the initial petition wasn't an option just for the increment on the complexity in our application, because we need check every situation where someone wants use a different combination between serializations and strategies, as you can the combinations are high, and that not the purpose of KloadGen. So we recommend you use only the serializers and strategies related from the source of the schema registry instead of mix them |
In project I've worked for, we've used Apicurio Schema Registry and Confluent SerDes exactly because of Apicurio's compatible API (if Apicurio would not be sufficient for our needs someday, so that we can switch to Confluent's schema registry if needed). We wanted to performance test our Kafka clients and system with KLoadGen. So using this combination excludes KLoadGen from performance testing system with Apicurio Schema Registry and Confluent SerDes? |
Okay thanks. I just wanted to make sure because I will send events to topic through KLoadGen, and my consumer will consume messages written in that topic. But because consumer uses Confluent's SerDes, it would not be able to read messages written with another serializer. |
I think you can test it, because I should be any difference between other serializers and Confluent's SerDes, basically you receive a message generated by Avro Structure, so Confluent's SerDes should work, basically the SerDes of Confluent just check your registry and check if have the correct format. |
There is a difference which makes using Apicurio's Serde in KLoadGen and Confluent's SerDes in Kafka consumer impossible. For example Apicurio uses 8 bytes to store schema ID in serialized Kafka message, while Confluent uses 4 bytes. |
Is there any possibility that we could configure used Apicurio Serde in KLoadGen that it uses 4 bytes to store ID instead of 8. There is possiblity to configure that in Apicurio Serde:
And then using Confluent SerDes in Kafka clients would be possible. |
Well... Right now I am testing that because I implemented that a few hours early hahaha, in a moment I will upload the changes and explain you what solution we have thought of. And thank you again for the contribution. |
hahah great then, happy to hear that :D |
The solution worked for me, but I had to change one thing, I disabled using headers in Apicurio Serde:
I'm not sure if Confluent SerDes can be used when schema ID is being sent in Kafka message headers, and it would be great if you could add another config in JMeter or somewhere so that using headers could be enabled/disabled. |
First of all, I am glad of hear works fine. And reading the documentation I interpreted as the headers was necessary to work with the |
Hi, I've noticed that you've added:
and headers are enabled by default. So it would be |
Mmm yes, you're right, I dont know why the put the other part of the documentation about if the header is absent at true... a bit confuse tbh. Thanks again for put the information. |
Yeah that caused me problems in past, very confusing part of documentation. |
Well at least I am not alone... haha. Now the changes are up. |
It's all good now, but maybe a bit confusing that you have to put |
Yes, I agree with that suggestion after check a few doubts about the default behavior. Apparently they use always the header enabled by default. So doesn't matter put at |
What happened?
Hi,
I'm trying to run Kafka producer that uses Apicurio schema registry and Confluent SerDes for serializing.
In Schema Registry Config Element I've defined that I uses Apicurio schema registry, and its URL http://apicurio-registry-croz-event-streaming.mos-cloud.lan.croz.net/. KLoadGen can connect to it and it retrieves existing schemas.
In KLG - Value Schema Serializer Config element for name strategy I've defined Confluent's RecordNameStrategy, and for serializer Confluent's KafkaAvroSerializer. I've also chosen which schema to use.
The problem is that when I use the combination of Apicurio schema registry and Confluent's SerDes I get an error and test plan can't be run. The error is that when using this combination, serializer is trying to fetch schema from
http://apicurio-registry-croz-event-streaming.mos-cloud.lan.croz.net/subjects/test.FirstSchemaStreamingPOCTest/versions?normalize=false
because it expects that Confluent schema registry is being used.Serializer should try to fetch from
http://apicurio-registry-croz-event-streaming.mos-cloud.lan.croz.net/apis/ccompat/v6/subjects/test.FirstSchemaStreamingPOCTest/versions?normalize=false
because Apicurio schema registry is being used, and it has compatible API
/apis/ccompat/v6
when using it in combination with Confluent's SerDes.Schema used is:
JMX testplan:
Kafka Producer Test Plan.zip
KloadGen Version
KLoadGen 5.6.3
Relevant log output
Have you added your JMX Testplan or a replica?
Have you added your Schema or a replica?
The text was updated successfully, but these errors were encountered: