zerocode: Problem working with Kafka messages with Record keys in Zerocode version 1.3.28 and later
Hi.
I have been executing kafka tests on older versions of kafka without having any issues but recently tried upgrading to more recent version - but have hit a problem when kafka messages with a key (containing dashes) is present.
ava.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('a' (code 97)): Expected space separating root-level values at [Source: (String)"326e9aff-9767-46a9-a5e9-22c339389da7"; line: 1, column: 7]
The record has uses a request id as the key
Record Key - 326e9aff-9767-46a9-a5e9-22c339389da7 , Record value - {"request_id": "326e9aff-9767-46a9-a5e9-22c339389da7" .... }
The messages are processed fine with 1.3.27 - so something must have changed in the 1.3.28 version which is leading to this exception.
Could anyone advise what might be the problem?
I found something online which possibly might be related (similar error returned) https://discuss.aerospike.com/t/root-level-value-error-when-using-aerospike-inbound-kafka-connector-with-librdkafka/6903
- PDF Attached (About the Kafka Key issue): Kafka Key Error - Root level value error when using Aerospike Inbound Kafka Connector with librdkafka - Connectors - Aerospike Community Forum.pdf
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (2 by maintainers)
Hi.
Running on 1.3.43 appears to have a fix in for the issue. Running on 1.3.44 is also fine.
Looking at the closed issues - i think the following issue was similar to my one.
https://github.com/authorjapps/zerocode/issues/657
Some entries in logs now when running the test.
Thanks to everyone for you assistance. I think this issue can be closed.
Yes. By referring to version 1.3.35, I mean to highlight a particular exception observed in the attached log file of the error stack in https://github.com/authorjapps/zerocode/issues/557#issuecomment-1816327627 belongs to 1.3.35 is handled by this
isKeyParseableAsJson()method inclusion in 1.3.43 . This exception was thrown at the reaTree() method when no appropriate string format is passed in the argument. For such cases,writeValueAsString()is a way to deal more adequately. I’ll keep PR pending and will raise a new one for test case inclusion to cover such cases.