Handle BatchMessagingMessageConverter with Kafka batch listeners

Closes gh-15942
This commit is contained in:
Stephane Nicoll
2019-02-13 17:06:38 +01:00
parent b183c0b709
commit 3d6def9f81
4 changed files with 83 additions and 12 deletions

View File

@@ -5880,9 +5880,12 @@ The following component creates a listener endpoint on the `someTopic` topic:
----
If a `KafkaTransactionManager` bean is defined, it is automatically associated to the
container factory. Similarly, if a `RecordMessageConverter`, `ErrorHandler` or
`AfterRollbackProcessor` bean is defined, it is automatically associated to the default
factory.
container factory. Similarly, if a `ErrorHandler` or `AfterRollbackProcessor` bean is
defined, it is automatically associated to the default factory.
Depending on the listener type, a `RecordMessageConverter` or `BatchMessageConverter` bean
is associated to the default factory. If only a `RecordMessageConverter` bean is present
for a batch listener, it is wrapped in a `BatchMessageConverter`.
TIP: A custom `ChainedKafkaTransactionManager` must be marked `@Primary` as it usually
references the auto-configured `KafkaTransactionManager` bean.