Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine docs for consistency and correctness #3588

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Two `MessageListenerContainer` implementations are provided:
* `KafkaMessageListenerContainer`
* `ConcurrentMessageListenerContainer`

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

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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ The following listing shows the definition of the `ProducerListener` interface:
----
public interface ProducerListener<K, V> {

void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata);
default void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata);

void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata,
default void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata,
Exception exception);

}
Expand Down Expand Up @@ -307,6 +307,7 @@ public KafkaTemplate<Integer, CustomValue> kafkaTemplate() {
Starting with version 2.5.10, you can now update the producer properties after the factory is created.
This might be useful, for example, if you have to update SSL key/trust store locations after a credentials change.
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.

NOTE: You cannot change a transactional producer factory to non-transactional, and vice-versa.

Two new methods are now provided:
Expand Down Expand Up @@ -447,7 +448,7 @@ catch (InterruptedException e) {
...
}
catch (ExecutionException e) {
if (e.getCause instanceof MyException) {
if (e.getCause() instanceof MyException) {
...
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ producerConfigs.put(DelegatingByTopicSerializer.VALUE_SERIALIZATION_TOPIC_CONFIG
"topic[0-4]:" + ByteArraySerializer.class.getName()
+ ", topic[5-9]:" + StringSerializer.class.getName());
...
ConsumerConfigs.put(DelegatingByTopicDeserializer.VALUE_SERIALIZATION_TOPIC_CONFIG,
consumerConfigs.put(DelegatingByTopicDeserializer.VALUE_SERIALIZATION_TOPIC_CONFIG,
"topic[0-4]:" + ByteArrayDeserializer.class.getName()
+ ", topic[5-9]:" + StringDeserializer.class.getName());
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
* @author Adrian Gygax
* @author Yaniv Nahoum
* @author Sanghyeok An
* @author Borahm Lee
*/
public class DefaultKafkaConsumerFactory<K, V> extends KafkaResourceFactory
implements ConsumerFactory<K, V>, BeanNameAware, ApplicationContextAware {
Expand Down Expand Up @@ -222,7 +223,7 @@ public void setValueDeserializerSupplier(Supplier<Deserializer<V>> valueDeserial

/**
* Set to false (default true) to prevent programmatically provided deserializers (via
* constructor or setters) from being configured using the producer configuration,
* constructor or setters) from being configured using the consumer configuration,
* e.g. if the deserializers are already fully configured.
* @param configureDeserializers false to not configure.
* @since 2.8.7
Expand Down