mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-09 02:49:02 +00:00
Automatically configure Spring Kafka's observation convention beans
This automatically registers KafkaListenerObservationConvention on the container factory, and KafkaTemplateObservationConvention on the Kafka template. Closes gh-48914
This commit is contained in:
+4
@@ -32,6 +32,8 @@ include-code::MyBean[]
|
||||
NOTE: If the property configprop:spring.kafka.producer.transaction-id-prefix[] is defined, a javadoc:org.springframework.kafka.transaction.KafkaTransactionManager[] is automatically configured.
|
||||
Also, if a javadoc:org.springframework.kafka.support.converter.RecordMessageConverter[] bean is defined, it is automatically associated to the auto-configured javadoc:org.springframework.kafka.core.KafkaTemplate[].
|
||||
|
||||
If there's a bean of type `KafkaTemplateObservationConvention` in the context, it is automatically registered on the `KafkaTemplate`.
|
||||
|
||||
|
||||
|
||||
[[messaging.kafka.receiving]]
|
||||
@@ -52,6 +54,8 @@ If only a javadoc:org.springframework.kafka.support.converter.RecordMessageConve
|
||||
|
||||
TIP: A custom javadoc:org.springframework.kafka.transaction.ChainedKafkaTransactionManager[] must be marked javadoc:org.springframework.context.annotation.Primary[format=annotation] as it usually references the auto-configured javadoc:org.springframework.kafka.transaction.KafkaTransactionManager[] bean.
|
||||
|
||||
If there's a bean of type `KafkaListenerObservationConvention` in the context, it is automatically registered on the container factory.
|
||||
|
||||
|
||||
|
||||
[[messaging.kafka.streams]]
|
||||
|
||||
Reference in New Issue
Block a user