ConduitIO/conduit-connector-kafka

The user can create the Kafka destination connector with an invalid value "-1"

Opened this issue · 2 comments

The user can create the Kafka destination connector with an invalid value "-1" for  the number of acknowledgments required before considering a record written to Kafka ( "acks": "-1" )
 
Expected result: Error: "message": "failed to create connector: could not init connector: invalid destination config: config is invalid: couldn't parse ack: unknown ack mode: required acks must be one of none, one, or all, not "-1""
 
Valid values: none, one, all. 

GitHub - ConduitIO/conduit-connector-kafka: Provides a source and a destination Kafka connector, for Conduit.

Image

@hariso need to check documentation because -1 is a valid value

We're using Segment client's acks.UnmarshalText method here, which is also able to handle integer values for this parameter. So it's valid to use:

  • none, one, all (text version)
  • 0, 1, -1 (int version).

We need to update the docs to mention this possibility too.