mingyen066 opened a new pull request, #23028: URL: https://github.com/apache/kafka/pull/23028
EmbeddedKafkaCluster#produce only accepts one record and blocks on send().get(), so callers that need many records have to loop and pay a round trip per record. Each of those round trips also waits out linger.ms for a batch that can never fill, because the caller is blocked in get(). Six call sites across four integration test classes produce ~11,000 records this way. Add a produce(List<ProducerRecord<byte[], byte[]>>) overload that sends the whole list before awaiting any acknowledgement, and have the single-record overloads delegate to it. Blocking behaviour is unchanged. Measured with -PmaxParallelForks=1, two runs per side: ``` TransformationIntegrationTest#testFilterOnTopicNameWithSinkConnector -20.3s ExampleConnectIntegrationTest#testSinkConnector -14.3s TransformationIntegrationTest#testFilterOnTombstonesWithSinkConnector -10.0s ErrorHandlingIntegrationTest#testErrantRecordReporter -6.3s MonitorableSinkIntegrationTest#testMonitorableSinkConnectorAndTask -6.0s ErrorHandlingIntegrationTest#testSkipRetryAndDLQWithHeaders -4.8s ``` Total for these four classes: 149.2s -> 87.4s. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
