-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Missing documentation about MultiResourceItemWriter not creating empty files when no data goes through delegates #4645
Comments
This is because you are wrapping the This detail seems to be missing in the Javadocs of |
Ok Thanks. Please update the docs in detailed to make things clear about it. I still believe it would be a nice option (true/false) to provide this functionality to create empty files when no item available for that writer. Would you mind providing some guidance on : https://stackoverflow.com/questions/78891040/spring-batch-issue-with-multiresourceitemwriter-and-classifiercompositeitemwrite |
@fmbenhassine - Would you mind answering questions: https://stackoverflow.com/questions/78891040/spring-batch-issue-with-multiresourceitemwriter-and-classifiercompositeitemwrite It's not clear we should keep as chunk size as 0 has any impact on the performance? If we we keep any size like 1000 or 2000. Then I definately see it's end up writing more records into file. so looks like doesn't behaving well. |
@javaHelper I added an answer: https://stackoverflow.com/a/78968181/5019386. This seems like a bug in Spring Batch to me, but I need to validate that with an example. Please open a separate issue for that case. Note: Please do not add comments on an issue to ask for support on a different issue. Thank you for your comprehension. |
Bug description
Spring Batch framework not creating an emty output files when data doesn't flow through that
Classifier
with theMultiResourceItemWriter
Environment
Spring Boot v2.7.1, Java version - 11
Steps to reproduce
Here is the code
Employee.java
employee.csv
Expected behavior
Even though there is no data for the role cloud develoer, expectation from Spring Batch to create an empty file with headers for the cloud developer.
Or am I missing anything?
I was hoping to see cloudDeveloper-1.csv file
The text was updated successfully, but these errors were encountered: