79782677

Date: 2025-10-04 21:01:53
Score: 1.5
Natty:
Report link

As other solutions did not work, I implemented some custom solution.

When the processor discovers no more data shall be processed it sets a flag in the stepContext's transientUserData. To prevent the current data from getting written, it also returns null. On the next loop iteration the reader checks transientUserData flag and - if set - returns null. This makes the partition stop.

As I want to use generic readers I implemented an ItemReaderListener that performs the check and action in the afterRead() method.

Reasons:
  • Blacklisted phrase (1): did not work
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: queeg