Skip to content

kafkaTemplate in KafkaItemWriter should be protected #3802

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

Closed
fmbenhassine opened this issue Nov 13, 2020 · 2 comments
Closed

kafkaTemplate in KafkaItemWriter should be protected #3802

fmbenhassine opened this issue Nov 13, 2020 · 2 comments
Labels
for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line in: infrastructure status: first-timers-only Issues that we would like first-timers only to work on type: enhancement
Milestone

Comments

@fmbenhassine
Copy link
Contributor

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.

@fmbenhassine fmbenhassine added has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: infrastructure type: enhancement status: first-timers-only Issues that we would like first-timers only to work on labels Nov 13, 2020
@fmbenhassine fmbenhassine added this to the 5.0.0-M1 milestone Nov 13, 2020
@adityausathe
Copy link
Contributor

I have opened PR #3807 to address this. @benas please review.

@fmbenhassine
Copy link
Contributor Author

Resolved with #3807 .

@fmbenhassine fmbenhassine modified the milestones: 5.0.0-M1, 4.3.1 Jan 21, 2021
@fmbenhassine fmbenhassine added for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line and removed has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" labels Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line in: infrastructure status: first-timers-only Issues that we would like first-timers only to work on type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants