Skip to content

KafkaMessageListenerContainer.handleConsumerError will never use batchErrorHandler #667

@tengvig

Description

@tengvig

The handleConsumerError method introduced in pull request #615 will never use batchErrorHandler. It will always use the default errorHandler:

if (this.errorHandler != null) { this.errorHandler.handle(e, Collections.emptyList(), this.consumer, KafkaMessageListenerContainer.this); } else if (this.batchErrorHandler != null) {

When the KafkaMessageListenerContainer instance is created, a LoggingErrorHandler will always be assigned as errorHandler in addition to a batchErrorHandler. Thus, the LoggingErrorHandler will always be used to handle consumer errors, e.g. quite annoying SerializationErrors.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions