Skip to content

Commit 127e620

Browse files
wind57garyrussell
authored andcommitted
GH-2562: Minor fix in the KafkaTemplate Javadocs
Resolves #2562
1 parent 3f645b1 commit 127e620

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ public KafkaTemplate(ProducerFactory<K, V> producerFactory, @Nullable Map<String
176176
/**
177177
* Create an instance using the supplied producer factory and autoFlush setting.
178178
* <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.
183183
* @param producerFactory the producer factory.
184184
* @param autoFlush true to flush after each send.
185185
* @see Producer#flush()
@@ -191,20 +191,18 @@ public KafkaTemplate(ProducerFactory<K, V> producerFactory, boolean autoFlush) {
191191
/**
192192
* Create an instance using the supplied producer factory and autoFlush setting.
193193
* <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
200199
* {@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
208206
* DefaultKafkaProducerFactory.
209207
* @param producerFactory the producer factory.
210208
* @param autoFlush true to flush after each send.

0 commit comments

Comments
 (0)