Skip to content
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]: Schema Registry URL in Consumer #395

Open
2 tasks done
CROprogrammer opened this issue Jul 7, 2023 · 4 comments
Open
2 tasks done

[Issue]: Schema Registry URL in Consumer #395

CROprogrammer opened this issue Jul 7, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@CROprogrammer
Copy link

What happened?

I've made my KLoadGen Kafka consumer, and I've added Schema Registry Config Element to consumer's Thread Group because there was no other config to define schema registry in com.sngular.kloadgen.sampler.KafkaConsumerSampler.
When I run consumer then I getter an error message:
Caused by: org.apache.kafka.common.config.ConfigException: Missing required configuration "schema.registry.url" which has no default value.

Schema used is:

{
  "type": "record",
  "name": "FirstSchemaStreamingPOCTest",
  "namespace": "test",
  "fields": [
    {
      "name": "randomNumber",
      "type": [
        "null",
        "string"
      ],
      "default": null
    },
    {
      "name": "randomCode",
      "type": [
        "null",
        "string"
      ],
      "default": null
    }
  ]
}

JMX testplan:
KLoadGen Test Plan.zip

KloadGen Version

KLoadGen 5.6.5

Relevant log output

org.apache.kafka.common.KafkaException: Failed to construct kafka consumer
	at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:823) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:664) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:645) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:625) ~[kloadgen-5.6.5.jar:?]
	at com.sngular.kloadgen.sampler.KafkaConsumerSampler.setupTest(KafkaConsumerSampler.java:44) ~[kloadgen-5.6.5.jar:?]
	at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:194) ~[ApacheJMeter_java.jar:5.5]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651) ~[ApacheJMeter_core.jar:5.5]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570) ~[ApacheJMeter_core.jar:5.5]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) ~[ApacheJMeter_core.jar:5.5]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) ~[ApacheJMeter_core.jar:5.5]
	at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: org.apache.kafka.common.config.ConfigException: Missing required configuration "schema.registry.url" which has no default value.
	at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:493) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:483) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:113) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:133) ~[kloadgen-5.6.5.jar:?]
	at io.confluent.kafka.serializers.AbstractKafkaSchemaSerDeConfig.<init>(AbstractKafkaSchemaSerDeConfig.java:211) ~[kloadgen-5.6.5.jar:?]
	at io.confluent.kafka.serializers.KafkaAvroDeserializerConfig.<init>(KafkaAvroDeserializerConfig.java:58) ~[kloadgen-5.6.5.jar:?]
	at io.confluent.kafka.serializers.KafkaAvroDeserializer.configure(KafkaAvroDeserializer.java:50) ~[kloadgen-5.6.5.jar:?]
	at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:716) ~[kloadgen-5.6.5.jar:?]
	... 10 more
2023-07-07 10:22:02,946 INFO o.a.j.t.JMeterThread: Thread is done: Consumer Thread Group 1-1
2023-07-07 10:22:02,947 INFO o.a.j.t.JMeterThread: Thread finished: Consumer Thread Group 1-1
2023-07-07 10:22:02,947 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2023-07-07 10:22:02,947 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

Have you added your JMX Testplan or a replica?

  • I have added a JMX testplan

Have you added your Schema or a replica?

  • I have added the Schema
@AdrianLagartera AdrianLagartera self-assigned this Jul 7, 2023
@AdrianLagartera AdrianLagartera added the bug Something isn't working label Jul 7, 2023
@AdrianLagartera
Copy link
Member

Thank you for collaborate again with us, we will give a look soon as posible

@CROprogrammer
Copy link
Author

Hi, is there any progress on this topic?
Thanks

@enriqueGonzalo
Copy link
Contributor

We are working on it, and as soon as possible, you will be able to try it.
Thank you for everything.

@CROprogrammer
Copy link
Author

Hi,
I've seen that you've created branch for this problem, and I've tested it.
It works okay but it has one bug.

It only work when I set in producer that schema ID will be passed via Kafka headers. When I set it to be passed via payload, then it does not work.

That property is apicurio.avro.header.id.
I'm not sure if apicurio.avro.confluent.compatibility will be problematic also.

This problem for producer was described here: #389
And it's solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants