kafka-webview: org.sourcelab.kafka.webview.ui.controller.api.exceptions.ApiException: Failed to construct kafka consumer
I have followed instructions in issue #81 to create a new format as per image below
But when trying to view the topic, I am getting “Failed to construct kafka consumer” message.
The view works to some extend when I am using String format instead of Avro so but obviously message is unreadable.
`2018-12-20 23:17:22.264 INFO 9 — [nio-8080-exec-5] o.a.kafka.common.utils.AppInfoParser : Kafka version : 1.1.1 2018-12-20 23:17:22.264 INFO 9 — [nio-8080-exec-5] o.a.kafka.common.utils.AppInfoParser : Kafka commitId : 98b6346a977495f6 2018-12-20 23:17:22.399 WARN 9 — [nio-8080-exec-9] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.sourcelab.kafka.webview.ui.controller.api.exceptions.ApiException: Failed to construct kafka consumer]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17
Here is condensed Avro schema. I have removed some info and changed field names. `{ “type”: “record”, “name”: “Future”, “namespace”: “au.com.xxx.models”, “fields”: [ { “name”: “index”, “type”: “int” }, { “name”: “description”, “type”: “string” }, { “name”: “inv_return”, “type”: [ { “type”: “record”, “name”: “Dollars”, “fields”: [ { “name”: “dollars”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } } ] }, { “type”: “record”, “name”: “LinePay”, “fields”: [ { “name”: “money”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } } ] } ] }, { “name”: “place_return”, “type”: [ “Dollars”, “LinePay” ] }, { “name”: “take”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “liability”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “laid_off_liability”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “limit”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “status”, “type”: “string” }, { “name”: “official”, “type”: “boolean” }, { “name”: “last_tkt_time”, “type”: [ “null”, { “type”: “long”, “logicalType”: “timestamp-millis” } ] }, { “name”: “take”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “liability”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “last_take”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “sort_order”, “type”: “int” }, { “name”: “deleted”, “type”: “boolean” }, { “name”: “override_reduction_percent”, “type”: “int” }, { “name”: “diff_price”, “type”: “boolean” }, { “name”: “session_take”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “session_liability”, “type”: { “type”: “bytes”, “logicalType”: “decimal”, “precision”: 20, “scale”: 2 } }, { “name”: “feed_id”, “type”: “string” }, { “name”: “value_type_str”, “type”: “string” }, { “name”: “group_id”, “type”: “string” }, { “name”: “last_official_time”, “type”: [ “null”, { “type”: “long”, “logicalType”: “timestamp-millis” } ] }, { “name”: “future_id”, “type”: “int” }, { “name”: “feed_return”, “type”: [ “Dollars”, “LinePay”, “Odds” ] } ] }
This looks good. I can see the data now. The only problem (And I am not sure if you can fix it. It could be that the bug or limitation is with the Avro deserialiser) is that the data that has been encoded in BYTES type is not converted to the logical type (decimal) and is not readable.
It progressed a bit further but at some stage run into this error: Error Could not write JSON: Not a map: {“type”:“record”,“name”:… rest of the schema follows. When I set the formats to String, String. The messages are displayed. Its just the portions of the data are not human readable. This would mean that the format is correct.