Skip to content

Commit be76cc3

Browse files
authored
Refine docs for improved accuracy (#3604)
1 parent 5fb1562 commit be76cc3

File tree

5 files changed

+11
-18
lines changed

5 files changed

+11
-18
lines changed

spring-kafka-docs/src/main/antora/modules/ROOT/pages/appendix/change-history.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ The `@KafkaListener` annotation now has the `filter` attribute, to override the
386386

387387
The `@KafkaListener` annotation now has the `info` attribute; this is used to populate the new listener container property `listenerInfo`.
388388
This is then used to populate a `KafkaHeaders.LISTENER_INFO` header in each record which can be used in `RecordInterceptor`, `RecordFilterStrategy`, or the listener itself.
389-
See xref:kafka/annotation-error-handling.adoc#li-header[Listener Info Header] and xref:kafka/container-props.adoc#alc-props[Abstract Listener Container Properties] for more information.
389+
See xref:kafka/annotation-error-handling.adoc#li-header[Listener Info Header] and xref:kafka/container-props.adoc#amlc-props[AbstractMessageListenerContainer Properties] for more information.
390390

391391
[[x28-template]]
392392
=== `KafkaTemplate` Changes

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Also see `idleBeforeDataMultiplier`.
130130
|[[listenerTaskExecutor]]<<listenerTaskExecutor,`listenerTaskExecutor`>>
131131
|`SimpleAsyncTaskExecutor`
132132
|A task executor to run the consumer threads.
133-
The default executor creates threads named `<name>-C-n`; with the `KafkaMessageListenerContainer`, the name is the bean name; with the `ConcurrentMessageListenerContainer` the name is the bean name suffixed with `-n` where n is incremented for each child container.
133+
The default executor creates threads named `<name>-C-n`; with the `KafkaMessageListenerContainer`, the name is the bean name; with the `ConcurrentMessageListenerContainer` the name is the bean name suffixed with `-m` where `m` is incremented for each child container. See xref:kafka/receiving-messages/container-thread-naming.adoc#container-thread-naming[Container Thread Naming].
134134

135135
|[[logContainerConfig]]<<logContainerConfig,`logContainerConfig`>>
136136
|`false`
@@ -239,8 +239,8 @@ Mutually exclusive; at least one must be provided; enforced by `ContainerPropert
239239
|Deprecated since 3.2, see <<kafkaAwareTransactionManager>>, xref:kafka/transactions.adoc#transaction-synchronization[Other transaction managers].
240240
|===
241241

242-
[[alc-props]]
243-
.`AbstractListenerContainer` Properties
242+
[[amlc-props]]
243+
.`AbstractMessageListenerContainer` Properties
244244
[cols="9,10,16", options="header"]
245245
|===
246246
| Property
@@ -320,10 +320,6 @@ Also see `interceptBeforeTx`.
320320
|(read only)
321321
|The partitions currently assigned to this container (explicitly or not).
322322

323-
|[[assignedPartitionsByClientId]]<<assignedPartitionsByClientId,`assignedPartitionsByClientId`>>
324-
|(read only)
325-
|The partitions currently assigned to this container (explicitly or not).
326-
327323
|[[clientIdSuffix]]<<clientIdSuffix,`clientIdSuffix`>>
328324
|`null`
329325
|Used by the concurrent container to give each child container's consumer a unique `client.id`.
@@ -348,10 +344,6 @@ Also see `interceptBeforeTx`.
348344
|(read only)
349345
|The aggregate of partitions currently assigned to this container's child `KafkaMessageListenerContainer`+++s+++ (explicitly or not).
350346

351-
|[[assignedPartitionsByClientId2]]<<assignedPartitionsByClientId2,`assignedPartitionsByClientId`>>
352-
|(read only)
353-
|The partitions currently assigned to this container's child `KafkaMessageListenerContainer`+++s+++ (explicitly or not), keyed by the child container's consumer's `client.id` property.
354-
355347
|[[concurrency]]<<concurrency,`concurrency`>>
356348
|1
357349
|The number of child `KafkaMessageListenerContainer`+++s+++ to manage.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ You can use this event to restart the container after such a condition:
111111

112112
[source, java]
113113
----
114-
if (event.getReason.equals(Reason.FENCED)) {
114+
if (event.getReason().equals(Reason.FENCED)) {
115115
event.getSource(MessageListenerContainer.class).start();
116116
}
117117
----
@@ -205,7 +205,7 @@ Consequently, in the preceding example, we narrow the events received based on t
205205
Since containers created for the `@KafkaListener` support concurrency, the actual containers are named `id-n` where the `n` is a unique value for each instance to support the concurrency.
206206
That is why we use `startsWith` in the condition.
207207

208-
CAUTION: If you wish to use the idle event to stop the lister container, you should not call `container.stop()` on the thread that calls the listener.
208+
CAUTION: If you wish to use the idle event to stop the listener container, you should not call `container.stop()` on the thread that calls the listener.
209209
Doing so causes delays and unnecessary log messages.
210210
Instead, you should hand off the event to a different thread that can then stop the container.
211211
Also, you should not `stop()` the container instance if it is a child container.

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/annotation-send-to.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The following example shows how to do so:
117117
----
118118
@Bean
119119
public KafkaTemplate<String, String> myReplyingTemplate() {
120-
return new KafkaTemplate<Integer, String>(producerFactory()) {
120+
return new KafkaTemplate<String, String>(producerFactory()) {
121121
122122
@Override
123123
public CompletableFuture<SendResult<String, String>> send(String topic, String data) {

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,10 +139,11 @@ The following listing shows the definition of the `ProducerListener` interface:
139139
----
140140
public interface ProducerListener<K, V> {
141141
142-
default void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata);
142+
default void onSuccess(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata) {
143+
}
143144
144-
default void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata,
145-
Exception exception);
145+
default void onError(ProducerRecord<K, V> producerRecord, RecordMetadata recordMetadata, Exception exception) {
146+
}
146147
147148
}
148149
----

0 commit comments

Comments
 (0)