Skip to content

Kafka binder default requiredAcks=1 conflicts with producer idempotence default #3170

@pch8388

Description

@pch8388

Summary

Kafka binder currently defaults spring.cloud.stream.kafka.binder.requiredAcks to 1.

At the same time, enable.idempotence is not explicitly configured by the binder,
so the Kafka client default (true) is used.

Problem

Kafka producer idempotence requires acks=all.
With binder default requiredAcks=1, this results in a conflicting configuration
and may disable idempotence-by-default behavior.

Background

Starting from Kafka client 3.x, the default value of acks is all,
and using acks=all is generally considered a safer default.

Proposal

Change the default value of spring.cloud.stream.kafka.binder.requiredAcks
from 1 to all.

Existing users can keep the current behavior by explicitly setting
spring.cloud.stream.kafka.binder.requiredAcks=1.

Follow-up

I will submit a pull request with this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions