Skip to content

Commit d684913

Browse files
Addressing PR review -s
Signed-off-by: Sanghyeok An <[email protected]>
1 parent 0a6c020 commit d684913

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ IMPORTANT: If the interceptor mutates the record (by creating a new one), the `t
2222

2323
The `CompositeRecordInterceptor` and `CompositeBatchInterceptor` can be used to invoke multiple interceptors.
2424

25+
Starting with version 4.0, `AbstractMessageListenerContainer` exposes `getRecordInterceptor()` as a public method.
26+
If the returned interceptor is an instance of `CompositeRecordInterceptor`, additional `RecordInterceptor` instances can be added to it even after the container instance extending `AbstractMessageListenerContainer` has been created and a `RecordInterceptor` has already been configured.
27+
28+
2529
By default, starting with version 2.8, when using transactions, the interceptor is invoked before the transaction has started.
2630
You can set the listener container's `interceptBeforeTx` property to `false` to invoke the interceptor after the transaction has started instead.
2731
Starting with version 2.9, this will apply to any transaction manager, not just `KafkaAwareTransactionManager`+++s+++.
@@ -265,4 +269,3 @@ The listener containers implement `SmartLifecycle`, and `autoStartup` is `true`
265269
The containers are started in a late phase (`Integer.MAX-VALUE - 100`).
266270
Other components that implement `SmartLifecycle`, to handle data from listeners, should be started in an earlier phase.
267271
The `- 100` leaves room for later phases to enable components to be auto-started after the containers.
268-

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ More details are available in xref:kafka/headers.adoc#multi-value-header[Support
8282

8383
The `KafkaMessageListenerContainer` and `ConcurrentMessageListenerContainer` support `getRecordInterceptor()`.
8484
If the returned interceptor is an instance of `CompositeRecordInterceptor`, additional `RecordInterceptor` instances can be added to it.
85+
More details are available in xref:kafka/receiving-messages/message-listener-container.adoc#message-listener-container[Message Listener Containers].

0 commit comments

Comments
 (0)