-
Notifications
You must be signed in to change notification settings - Fork 631
Closed
Closed
Copy link
Milestone
Description
Describe the issue
The clientFactoryCustomizer does not register properly when it is a transaction producer.
To Reproduce
@Bean
ClientFactoryCustomizer clientFactoryCustomizer() {
return new ClientFactoryCustomizer() {
@Override
public void configure(ProducerFactory<?, ?> producerFactory) {
if (producerFactory instanceof DefaultKafkaProducerFactory) {
((DefaultKafkaProducerFactory) producerFactory).setMaxAge(Duration.ofDays(6));
}
}
};
}
spring:
cloud:
stream:
kafka:
binder:
brokers: host
required-acks: all
auto-create-topics: false
auto-add-partitions: false
transaction:
transaction-id-prefix: ${random.uuid}
producer-properties:
acks: all
retries: 3
enable.idempotence: true
max.in.flight.requests.per.connection: 1
max.block.ms: 5000
bindings:
outbound-test-command:
producer:
allowNonTransactional: false
clientFactoryCustomizer needs to set maxAge but cannot.
Version of the framework
:: Spring Boot :: (v3.4.1)
spring-cloud-stream 4.2
spring-cloud-stream-binder-kafka 4.2
Expected behavior
clientFactoryCustomizer needs to set maxAge
Screenshots
Additional context
Add any other context about the problem here.
chanhyeong