All Kafka numeric configuration options should be set using strings

An example of an error condition due to this was when setting in a Kafka source config :
“”: 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 Expected value to be a 32-bit integer, but it was a java.lang.Long

To avoid the error in this case, use:
“”: “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.

Posted: June 5, 2020 at 11:10 pm
Replies: 0
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy