If you need to determine that a broker does not support transactions before trying to make use of them, it may be possible to do so via [`NodeApiVersions.latestUsableVersion`](https://github.com/apache/kafka/blob/3cdc78e6bb1f83973a14ce1550fe3874f7348b05/clients/src/main/java/org/apache/kafka/clients/NodeApiVersions.java#L91).
You'd have to iterate over the cluster nodes and check `apiVersions.latestUsableVersion(ApiKeys.PRODUCE)` is `>= 3`. Version 3 of the produce request [introduced transactions](https://kafka.apache.org/protocol#The_Messages_Produce). Although deprecated, the Scala [`AdminClient`](https://github.com/apache/kafka/blob/fc5f6b0e46ff81302b3e445fed0cdf454c942792/core/src/main/scala/kafka/admin/AdminClient.scala) has code that demonstrates how to obtain this information. [ Full content available at: https://github.com/apache/flink/pull/6577 ] This message was relayed via gitbox.apache.org for [email protected]
