Skip to content

Publish Event In Container when Authorization/Authentication Exception occurs and retry takes place #2284

@indraneelb1903

Description

@indraneelb1903

Hi @garyrussell and @artembilan

I am using spring kafka and i need to do something when kafka connection error happens due to authorization/authentication exception been thrown in the following class - https://github.com/spring-projects/spring-kafka/blob/main/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java

No , i do not want the container to stop , hence i have the authExceptionRetryInterval set. But what i would also like is an application event to be published when this kind of error occurs so i can listen on it and then do something custom.

Also , i would also like an event to be published when the connection is successfully restored in the pollAndInvoke() method in the same class. Please let me know your thoughts on the same and if you guys are open to such a change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions