amazon-kinesis-connectors icon indicating copy to clipboard operation
amazon-kinesis-connectors copied to clipboard

ITransformer: Using java.lang.Exception instead of IOException

Open darkcrawler01 opened this issue 9 years ago • 1 comments

Hi

I feel that defining toClass & fromClass to throw IOException is very constraining. In case, I am performing some validation and want to throw some custom Exception I cannot do that. Also the KinesisConnectorRecordProcessor only handles IOExceptions, its even handle any other Runtime Exceptions that may occur. This is not a valid reason to stop processing the rest of the records. Hence I request you to change the use java.lang.Exception or at the very least use RuntimeExceptions instead everywhere

darkcrawler01 avatar Apr 20 '15 19:04 darkcrawler01

I second this request. Recently, in my application, the worker went into an infinite loop due to this issue. A non-IOException was thrown due to a data processing error and because of the above issue, the RecordProcessor never checkpointed the record. So it kept processing the same record over and over again. I had to catch all exceptions in my code and throw an "IOException" to get past this issue. I used kinesis-connectors version 1.1.2.

workanandr avatar Aug 17 '15 17:08 workanandr