An example of an error condition due to this was when setting in a Kafka source config :
“max.in.flight.requests.per.connection”: 40
Saving the source got the error:
HTTP Status 400 (while creating a Source):
Request failed due to exception: org.apache.kafka.common.config.ConfigException: Invalid value 40 for configuration max.in.flight.requests.per.connection: Expected value to be a 32-bit integer, but it was a java.lang.Long
To avoid the error in this case, use:
“max.in.flight.requests.per.connection”: “40”
This avoids issues with Long -> Int or Int -> Short conversions that may be necessary depending on the expected type of the configuration option. Using string values avoids all of this since the configuration code will parse and convert as needed.
An example of an error condition due to this was when setting in a Kafka source config :
“max.in.flight.requests.per.connection”: 40
Saving the source got the error:
HTTP Status 400 (while creating a Source):
Request failed due to exception: org.apache.kafka.common.config.ConfigException: Invalid value 40 for configuration max.in.flight.requests.per.connection: Expected value to be a 32-bit integer, but it was a java.lang.Long
To avoid the error in this case, use:
“max.in.flight.requests.per.connection”: “40”
This avoids issues with Long -> Int or Int -> Short conversions that may be necessary depending on the expected type of the configuration option. Using string values avoids all of this since the configuration code will parse and convert as needed.