Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot Property for Spring Kafka authExceptionRetryInterval #44199

Open
cabbonizio opened this issue Feb 10, 2025 · 0 comments
Open

Spring Boot Property for Spring Kafka authExceptionRetryInterval #44199

cabbonizio opened this issue Feb 10, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@cabbonizio
Copy link

Hi there I have a spring boot app that makes use of both a kafka consumer and producer. I have been able to configure mostly everything with YAML properties but one property I am coming up short is:

org.springframework.kafka.listener.ConsumerProperties.authExceptionRetryInterval (java.time.Duration)

It seems like this property should be included in the org.springframework.boot.autoconfigure.kafka.Listener static configuration class, but I don't see it. Based on the configuration of Spring Kafka, I think this should be the logical place to put it, for instance like so:

spring:
  kafka:
    listener:
      auth-exception-retry-interval: 30s
      ack-mode: record
      concurrency: 2
      client-id: sample
    retry:
      topic:
        attempts: 5
        backoff:
          delay: 5000         
    bootstrap-servers:
    - xxxxxxxxxxxxxxxxxxxxx
    producer:
      transaction-id-prefix: ${spring.application.name}			
      key-serializer: org.springframework.kafka.support.serializer.JsonSerializer
      value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
      compression-type: zstd
      retries: 5
      properties:
        "[linger.ms]": 1
    consumer:
      group-id: sample
      key-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
      value-deserializer: org.springframework.kafka.support.serializer.JsonSerializer
      auto-offset-reset: latest
      properties:
        "[spring.json.trusted.packages]": com.sample
        "[spring.json.use.type.headers]": false
    properties:
      "[security.protocol]": SASL_SSL
      "[sasl.mechanism]": SCRAM-SHA-512
      "[sasl.jaas.config]": ${kafka.sasl.jaas.config}

Unless I am missing something would it be possible to add this in as an enhancement, as this allows one to go full configuration based auto-configuration without the need of defining a custom property.

many thx!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants