Skip to content

Compatibility Apicurio Confluent-Kafka Python libraries.  #3292

@juliantxo163

Description

@juliantxo163

Hello. I am noob developing with python and I am not sure if it is possible what I am trying to do. I thought that Apicurio Registry was compatible with Confluent Schema Registry, in order to use confluent-kafka-python libraries.

I have deployed an Apicurio registry (last release in memory image , in Kubernetes v1.22.3 minikube).

Everything right till now, I am able to create, update or delete artifacts by the API rest or the UI.

But I am not pretty sure if I can use confluent library python to develop a producer with Apicurio registry as Schema registry. I am trying to run and example from: https://github.com/confluentinc/confluent-kafka-python/blob/master/examples/json_producer.py

(julian) [julian@julianmachine examples]$ python json_producer.py -b localhost:9092 -s http://localhost:8082/apis/registry/v2
Producing user records to topic example_serde_json. ^C to exit.
Enter name: admin  
Enter address: street123
Enter favorite number: 15
Enter favorite color: red
Traceback (most recent call last):
  File "json_producer.py", line 161, in <module>
    main(parser.parse_args())
  File "json_producer.py", line 140, in main
    value=json_serializer(user, SerializationContext(topic, MessageField.VALUE)),
  File "/home/julian/.local/share/virtualenvs/julian-DzUCWoBY/lib/python3.7/site-packages/confluent_kafka/schema_registry/json_schema.py", line 254, in __call__
    self._normalize_schemas)
  File "/home/julian/.local/share/virtualenvs/julian-DzUCWoBY/lib/python3.7/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 339, in register_schema
    body=request)
  File "/home/julian/.local/share/virtualenvs/julian-DzUCWoBY/lib/python3.7/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 128, in post
    return self.send_request(url, method='POST', body=body)
  File "/home/julian/.local/share/virtualenvs/julian-DzUCWoBY/lib/python3.7/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 177, in send_request
    response.json().get('message'))
confluent_kafka.schema_registry.error.SchemaRegistryError: RESTEASY003210: Could not find resource for full path: http://localhost:8082/apis/registry/v2/subjects/example_serde_json-value/versions?normalize=False (HTTP status code 404, SR code 404)
(julian) [julian@julianmachine examples]$ 

Does I missing some parameters? Maybe a group.id in apicurio named "subjects"...?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions