You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature:
Recreation of kafka producer during runtime
Description:
It should be possible to allow recreation of kafka producers during runtime (means: spring boot aplication must not be restared). This can be useful, e.g. if connection security properties change, like a new client certificate being provided, etc.
Current mode:
Currently, e.g. SSLContext can be modified by specifying a custom SslEngineFactory. However, this applies only during creation time of a kafka producer and cannot be updated during lifetime.
Future mode:
Producer lifecycle could be modified by using setMaxAge() or reset() of DefaultKafkaProducerFactory. However, when using spring-cloud-stream, one can neither get a hold of DefaultKafkaProducerFactory, nor replace it with a custom implementation, because its explicitly referenced.
Of course, various other possibilities exist to implement.
Versions:
Observed with Spring Boot 3.0.11 and Spring 2022.0.4.
Feature:
Recreation of kafka producer during runtime
Description:
It should be possible to allow recreation of kafka producers during runtime (means: spring boot aplication must not be restared). This can be useful, e.g. if connection security properties change, like a new client certificate being provided, etc.
Current mode:
Currently, e.g. SSLContext can be modified by specifying a custom SslEngineFactory. However, this applies only during creation time of a kafka producer and cannot be updated during lifetime.
Future mode:
Producer lifecycle could be modified by using
setMaxAge()
orreset()
ofDefaultKafkaProducerFactory
. However, when using spring-cloud-stream, one can neither get a hold ofDefaultKafkaProducerFactory
, nor replace it with a custom implementation, because its explicitly referenced.Of course, various other possibilities exist to implement.
Versions:
Observed with Spring Boot 3.0.11 and Spring 2022.0.4.
Reference:
See https://stackoverflow.com/questions/77257927/refreshing-kafka-producer-during-runtime-in-spring-application/77259917#77259917
The text was updated successfully, but these errors were encountered: