Jam*_*ark 2 apache-kafka kafka-consumer-api apache-kafka-connect
在我的用例中,我创建了 JDBC kafka 连接器,从 oracle 表中提取数据并成功推送到 kafka 主题,但是当我尝试读取来自这个 kafka 主题的消息时,我遇到了如下所示的反序列化问题。
org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id 2
Caused by: java.net.MalformedURLException: unknown protocol: localhost
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:124)
at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:188)
at io.confluent.kafka.schemaregistry.client.rest.RestService.getId(RestService.java:330)
Run Code Online (Sandbox Code Playgroud)
问题在于 YAML 配置文件中的架构注册表 URL。注意unknown protocol错误
将其更改为此(注意我将http://协议添加到 URL 行),它应该可以工作:
schema:
version: latest2
registry:
url: http://localhost:8081
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4878 次 |
| 最近记录: |