我正在尝试使用confluent-kafka python API创建CachedSchemaRegistryClient
的obj。但它遇到了以下异常
Exception ignored in: <bound method CachedSchemaRegistryClient.__del__ of <confluent_kafka.avro.cached_schema_registry_client.CachedSchemaRegistryClient object at 0x7f81f6fd6828>>
Traceback (most recent call last):
File "/home/hades/myapp/anaconda3/lib/python3.4/site-packages/confluent_kafka/avro/cached_schema_registry_client.py", line 118, in __del__
File "/home/hades/myapp/anaconda3/lib/python3.4/site-packages/confluent_kafka/avro/cached_schema_registry_client.py", line 127, in close
File "/home/hades/myapp/anaconda3/lib/python3.4/site-packages/requests/sessions.py", line 721, in close
File "/home/hades/myapp/anaconda3/lib/python3.4/_collections_abc.py", line 512, in __iter__
File "/home/hades/myapp/anaconda3/lib/python3.4/reprlib.py", line 24, in wrapper
File "/home/hades/myapp/anaconda3/lib/python3.4/collections/__init__.py", line 202, in __repr__
File "/home/hades/myapp/anaconda3/lib/python3.4/_collections_abc.py", line 497, in __iter__
File "/home/hades/myapp/anaconda3/lib/python3.4/collections/__init__.py", line 91, in __iter__
ReferenceError: weakly-referenced object no longer exists
我的代码很简单,如下所示:
CachedSchemaRegistryClient('http://localhost:8081')
使用curl,我可以获取在融合的kafka注册服务中注册的avro模式。