2121import java .util .function .Consumer ;
2222import java .util .function .Function ;
2323
24- import org .apache .kafka .clients .producer .ProducerRecord ;
25-
2624import org .springframework .expression .Expression ;
2725import org .springframework .expression .common .LiteralExpression ;
2826import org .springframework .integration .dsl .ComponentsRegistration ;
@@ -239,8 +237,8 @@ public S timestampExpression(Expression timestampExpression) {
239237 }
240238
241239 /**
242- * Configure a SpEL expression to determine whether or not to flush the producer after
243- * a send. By default the producer is flushed if a header {@code kafka_flush} has a
240+ * Configure a SpEL expression to determine whether to flush the producer after
241+ * a send. By default, the producer is flushed if a header {@code kafka_flush} has a
244242 * value {@link Boolean#TRUE}.
245243 * @param flushExpression the timestamp expression to use.
246244 * @return the spec.
@@ -251,8 +249,8 @@ public S flushExpression(String flushExpression) {
251249
252250 /**
253251 * Configure a {@link Function} that will be invoked at runtime to determine whether
254- * or not to flush the producer after a send. By default the producer is flushed if a
255- * header {@code kafka_flush} has a value {@link Boolean#TRUE}. Typically used with a
252+ * to flush the producer after send. By default, the producer is flushed if a
253+ * header {@code kafka_flush} has a value {@link Boolean#TRUE}. Typically, used with a
256254 * Java 8 Lambda expression:
257255 * <pre class="code">
258256 * {@code
@@ -268,8 +266,8 @@ public <P> S flush(Function<Message<P>, Boolean> flushFunction) {
268266 }
269267
270268 /**
271- * Configure an {@link Expression} to determine whether or not to flush the producer
272- * after a send. By default the producer is flushed if a header {@code kafka_flush}
269+ * Configure an {@link Expression} to determine whether to flush the producer
270+ * after a send. By default, the producer is flushed if a header {@code kafka_flush}
273271 * has a value {@link Boolean#TRUE}.
274272 * @param flushExpression the timestamp expression to use.
275273 * @return the spec.
@@ -293,7 +291,7 @@ public S sync(boolean sync) {
293291
294292 /**
295293 * Specify a timeout in milliseconds how long {@link KafkaProducerMessageHandler}
296- * should wait wait for send operation results. Defaults to 10 seconds.
294+ * should wait for send operation results. Defaults to 10 seconds.
297295 * @param sendTimeout the timeout to wait for result fo send operation.
298296 * @return the spec.
299297 */
@@ -379,8 +377,8 @@ public S futuresChannel(String futuresChannel) {
379377 }
380378
381379 /**
382- * Set a {@link ProducerRecordCreator} to create the {@link ProducerRecord}. Ignored
383- * if {@link #useTemplateConverter(boolean) useTemplateConverter} is true.
380+ * Set a {@link ProducerRecordCreator} to create the {@link org.apache.kafka.clients.producer. ProducerRecord}.
381+ * Ignored if {@link #useTemplateConverter(boolean) useTemplateConverter} is true.
384382 * @param creator the creator.
385383 * @return the spec.
386384 * @since 5.5.5
@@ -392,7 +390,7 @@ public S producerRecordCreator(ProducerRecordCreator<K, V> creator) {
392390
393391 /**
394392 * Set to true to use the template's message converter to create the
395- * {@link ProducerRecord} instead of the
393+ * {@link org.apache.kafka.clients.producer. ProducerRecord} instead of the
396394 * {@link #producerRecordCreator(ProducerRecordCreator) producerRecordCreator}.
397395 * @param use true to use the converter.
398396 * @return the spec.
@@ -409,7 +407,8 @@ public S useTemplateConverter(boolean use) {
409407 * @param <K> the key type.
410408 * @param <V> the value type.
411409 */
412- public static class KafkaProducerMessageHandlerTemplateSpec <K , V > extends KafkaProducerMessageHandlerSpec <K , V , KafkaProducerMessageHandlerTemplateSpec <K , V >>
410+ public static class KafkaProducerMessageHandlerTemplateSpec <K , V >
411+ extends KafkaProducerMessageHandlerSpec <K , V , KafkaProducerMessageHandlerTemplateSpec <K , V >>
413412 implements ComponentsRegistration {
414413
415414 private final KafkaTemplateSpec <K , V > kafkaTemplateSpec ;
@@ -428,6 +427,7 @@ public static class KafkaProducerMessageHandlerTemplateSpec<K, V> extends KafkaP
428427 */
429428 public KafkaProducerMessageHandlerTemplateSpec <K , V > configureKafkaTemplate (
430429 Consumer <KafkaTemplateSpec <K , V >> configurer ) {
430+
431431 Assert .notNull (configurer , "The 'configurer' cannot be null" );
432432 configurer .accept (this .kafkaTemplateSpec );
433433 return _this ();
0 commit comments