confluentinc / kafka-connect-datagen

Connector that generates data for demos
Apache License 2.0
19 stars 87 forks source link

[CCLOG-1916] Adding timeout support for generator.generate() #112

Open garrix-fan opened 2 years ago

garrix-fan commented 2 years ago

Problem

Avro random library 'generator.generate()' is a blocking call in task poll() method of datagen source connector. Practically, it is possible to create a regex which can make this method run indefinitely.

Solution

Idea is to add a timeout for the same post which the task will fail with an exception. Timeout would be a parameter which can be configured.

Does this solution apply anywhere else?
If yes, where?

NA

Test Strategy

Testing done:

Release Plan