Open Vetrenik opened 5 years ago
The vanilla print
will only display messages as they are produced. What's the production rate on the topic?
The vanilla
6 seconds
And, if i have set limit to print output, i'm getting such result:
Format:AVRO 8/13/19 11:12:01 AM YEKT, null, {"id": 185, "name_eng": "Russian Federation", "name_native": "Российская Федерация", "currency_name": "RUB", "code": 643} 8/13/19 11:12:01 AM YEKT, null, {"id": 1, "name_eng": "Afghanistan", "name_native": null, "currency_name": null, "code": 4}
As you see, result format is neither AVRO nor JSON, how should i parse it without string-by-string cutting of JSON substrings?
Most string processing libraries have a split operator that accepts a limit of splits.
You have 3 columns here, the last of which is indeed JSON, the value of the deserialized Avro messages
Though, if you're using Java, why not just write a regular consumer?
Got a problem, when sending "print 'topic'" request with KSQL REST API. It takes near a three minutes untill i got hte first byte of response body. Ksql server reports that printing starts immideately. Using ApacheHttpCLient.
` public class KSQL_rest_test { public static JSONObject executeKSQL(String url, List reqHeaders, JSONObject config) throws InterruptedException, IOException {
JSONObject res = new JSONObject();
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
CloseableHttpResponse response;
}
`