Skip to content

kafkaTemplate in KafkaItemWriter should be protected #3802

Closed
@fmbenhassine

Description

@fmbenhassine

As of v4.3.0, the kafkaTemplate field in KafkaItemWriter is private. This makes it impossible to use the template in overridden methods like writeKeyValue or write:

KafkaItemWriter<String, String> myCustomKafkaItemWriter = new KafkaItemWriter<String, String>() {
	@Override
	public void write(List<? extends String> items) throws Exception {
		// unable to use super.kafkaTemplate here
	}
};

The visibility of the field kafkaTemplate in KafkaItemWriter should be changed from private to protected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions