MCPcopy
hub / github.com/IBM/sarama / javaProducerArgs

Function javaProducerArgs

functional_java_interop_test.go:274–283  ·  view source on GitHub ↗
(topic string, codec CompressionCodec)

Source from the content-addressed store, hash-verified

272}
273
274func javaProducerArgs(topic string, codec CompressionCodec) []string {
275 args := make([]string, 0, 8)
276 if kafkaVersionAtLeast("2.5.0") {
277 args = append(args, "--bootstrap-server", brokerAddr)
278 } else {
279 args = append(args, "--broker-list", brokerAddr)
280 }
281 args = append(args, "--topic", topic)
282 return append(args, javaProducerCompressionArgs(codec)...)
283}
284
285func javaProducerCompressionArgs(codec CompressionCodec) []string {
286 if kafkaVersionAtLeast("0.10.0") {

Callers 1

produceWithJavaFunction · 0.85

Calls 2

kafkaVersionAtLeastFunction · 0.85

Tested by

no test coverage detected