"artifactId cannot be null" error in Apicurio Registry's deserializer #3322
Unanswered
hongbo-miao
asked this question in
Q&A
Replies: 1 comment
-
|
Hi @hongbo-miao, This is an interesting problem. The only chance for this error to happen is when no headers are written with the coordinates here. Are you by any chance using a custom HeadersHandler? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Originally asked in Stack Overflow. Below is a copy. Any guide would be appreciate, thanks! 😃
I am trying to figure what Kafka record header format does Apicurio Registry's deserializer expect.
My Avro Schema in Apicurio Registry
I have an artifact with ID
hm.motor-value.curl --location 'http://apicurio-registry.svc/apis/registry/v2/groups/default/artifacts/hm.motor-value'will return
{ "type": "record", "namespace": "com.hongbomiao", "name": "motor", "fields": [ { "name": "timestamp", "type": "long" }, { "name": "current", "type": "double" }, { "name": "voltage", "type": "double" }, { "name": "temperature", "type": "double" } ] }My Spark code
Here is my Spark code to generate Kafka record in Avro format:
My JDBC connector config
{ "name": "hm-motor-jdbc-sink-kafka-connector", "connector.class": "io.aiven.connect.jdbc.JdbcSinkConnector", "tasks.max": 10, "topics": "hm.motor", "connection.url": "jdbc:postgresql://timescale.hm-timescale.svc:5432/hm_iot_db", "connection.user": "xxx", "connection.password": "xxx", "insert.mode": "insert", "table.name.format": "motor", "value.converter": "io.apicurio.registry.utils.converter.AvroConverter", "value.converter.apicurio.registry.url": "http://apicurio-registry.svc:8080/apis/registry/v2", "value.converter.apicurio.registry.fallback.artifact-id": "hm.motor-value" }Above code works well. Now I am hoping to get rid of
"value.converter.apicurio.registry.fallback.artifact-id": "hm.motor-value"in the Kafka connector.Based on this doc,
my Kafka topic name is
hm.motor, I expect it to match with the schema with artifact IDhm.motor-value.However, right now if I remove
"value.converter.apicurio.registry.fallback.artifact-id": "hm.motor-value"in my JDBC sink connector, I will get error:Any idea? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions