Skip to content

Commit 5c7ec23

Browse files
authored
Refine docs for consistency and correctness
1 parent ee56e66 commit 5c7ec23

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/message-listener-container.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Two `MessageListenerContainer` implementations are provided:
66
* `KafkaMessageListenerContainer`
77
* `ConcurrentMessageListenerContainer`
88

9-
The `KafkaMessageListenerContainer` receives all message from all topics or partitions on a single thread.
9+
The `KafkaMessageListenerContainer` receives all messages from all topics or partitions on a single thread.
1010
The `ConcurrentMessageListenerContainer` delegates to one or more `KafkaMessageListenerContainer` instances to provide multi-threaded consumption.
1111

1212
Starting with version 2.2.7, you can add a `RecordInterceptor` to the listener container; it will be invoked before calling the listener allowing inspection or modification of the record.

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/sending-messages.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ The following listing shows the definition of the `ProducerListener` interface:
139139
----
140140
public interface ProducerListener<K, V> {
141141
142-
void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata);
142+
default void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata);
143143
144-
void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata,
144+
default void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata,
145145
Exception exception);
146146
147147
}
@@ -307,6 +307,7 @@ public KafkaTemplate<Integer, CustomValue> kafkaTemplate() {
307307
Starting with version 2.5.10, you can now update the producer properties after the factory is created.
308308
This might be useful, for example, if you have to update SSL key/trust store locations after a credentials change.
309309
The changes will not affect existing producer instances; call `reset()` to close any existing producers so that new producers will be created using the new properties.
310+
310311
NOTE: You cannot change a transactional producer factory to non-transactional, and vice-versa.
311312

312313
Two new methods are now provided:
@@ -447,7 +448,7 @@ catch (InterruptedException e) {
447448
...
448449
}
449450
catch (ExecutionException e) {
450-
if (e.getCause instanceof MyException) {
451+
if (e.getCause() instanceof MyException) {
451452
...
452453
}
453454
}

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/serdes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ producerConfigs.put(DelegatingByTopicSerializer.VALUE_SERIALIZATION_TOPIC_CONFIG
364364
"topic[0-4]:" + ByteArraySerializer.class.getName()
365365
+ ", topic[5-9]:" + StringSerializer.class.getName());
366366
...
367-
ConsumerConfigs.put(DelegatingByTopicDeserializer.VALUE_SERIALIZATION_TOPIC_CONFIG,
367+
consumerConfigs.put(DelegatingByTopicDeserializer.VALUE_SERIALIZATION_TOPIC_CONFIG,
368368
"topic[0-4]:" + ByteArrayDeserializer.class.getName()
369369
+ ", topic[5-9]:" + StringDeserializer.class.getName());
370370
----

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
* @author Adrian Gygax
7575
* @author Yaniv Nahoum
7676
* @author Sanghyeok An
77+
* @author Borahm Lee
7778
*/
7879
public class DefaultKafkaConsumerFactory<K, V> extends KafkaResourceFactory
7980
implements ConsumerFactory<K, V>, BeanNameAware, ApplicationContextAware {
@@ -222,7 +223,7 @@ public void setValueDeserializerSupplier(Supplier<Deserializer<V>> valueDeserial
222223

223224
/**
224225
* Set to false (default true) to prevent programmatically provided deserializers (via
225-
* constructor or setters) from being configured using the producer configuration,
226+
* constructor or setters) from being configured using the consumer configuration,
226227
* e.g. if the deserializers are already fully configured.
227228
* @param configureDeserializers false to not configure.
228229
* @since 2.8.7

0 commit comments

Comments
 (0)