Our Spring Batch application has:a custom JdbcCursorItemReader which reads from the database, and a custom JmsItemWriter, which enables headers to added to each message.
The idea is that each message will have a correlation id and be part of a set. Within the JmsItemWriter, we need to access the total number of rows which the item reader retrieved.
What is the best approach to do this?
Thanks