@@ -176,10 +176,10 @@ public KafkaTemplate(ProducerFactory<K, V> producerFactory, @Nullable Map<String
176
176
/**
177
177
* Create an instance using the supplied producer factory and autoFlush setting.
178
178
* <p>
179
- * Set autoFlush to {@code true} if you have configured the producer's
180
- * {@code linger.ms} to a non-default value and wish send operations on this template
181
- * to occur immediately, regardless of that setting, or if you wish to block until the
182
- * broker has acknowledged receipt according to the producer's {@code acks} property.
179
+ * Set autoFlush to {@code true} if you wish for the send operations on this template
180
+ * to occur immediately, regardless of the {@code linger.ms} or {@code batch.size}
181
+ * property values. This will also block until the broker has acknowledged receipt
182
+ * according to the producer's {@code acks} property.
183
183
* @param producerFactory the producer factory.
184
184
* @param autoFlush true to flush after each send.
185
185
* @see Producer#flush()
@@ -191,20 +191,18 @@ public KafkaTemplate(ProducerFactory<K, V> producerFactory, boolean autoFlush) {
191
191
/**
192
192
* Create an instance using the supplied producer factory and autoFlush setting.
193
193
* <p>
194
- * Set autoFlush to {@code true} if you have configured the producer's
195
- * {@code linger.ms} to a non-default value and wish send operations on this template
196
- * to occur immediately, regardless of that setting, or if you wish to block until the
197
- * broker has acknowledged receipt according to the producer's {@code acks} property.
198
- * If the configOverrides is not null or empty, a new
199
- * {@link ProducerFactory} will be created using
194
+ * Set autoFlush to {@code true} if you wish for the send operations on this template
195
+ * to occur immediately, regardless of the {@code linger.ms} or {@code batch.size}
196
+ * property values. This will also block until the broker has acknowledged receipt
197
+ * according to the producer's {@code acks} property. If the configOverrides is not
198
+ * null or empty, a new {@link ProducerFactory} will be created using
200
199
* {@link org.springframework.kafka.core.ProducerFactory#copyWithConfigurationOverride(java.util.Map)}
201
- * The factory shall apply the overrides after the supplied factory's properties.
202
- * The {@link org.springframework.kafka.core.ProducerPostProcessor}s from the
203
- * original factory are copied over to keep instrumentation alive.
204
- * Registered {@link org.springframework.kafka.core.ProducerFactory.Listener}s are
205
- * also added to the new factory. If the factory implementation does not support
206
- * the copy operation, a generic copy of the ProducerFactory is created which will
207
- * be of type
200
+ * The factory shall apply the overrides after the supplied factory's properties. The
201
+ * {@link org.springframework.kafka.core.ProducerPostProcessor}s from the original
202
+ * factory are copied over to keep instrumentation alive. Registered
203
+ * {@link org.springframework.kafka.core.ProducerFactory.Listener}s are also added to
204
+ * the new factory. If the factory implementation does not support the copy operation,
205
+ * a generic copy of the ProducerFactory is created which will be of type
208
206
* DefaultKafkaProducerFactory.
209
207
* @param producerFactory the producer factory.
210
208
* @param autoFlush true to flush after each send.
0 commit comments