Announcement Announcement Module
No announcement yet.
StaxEventItemWriter equivalent for JSON for restartable jobs Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • StaxEventItemWriter equivalent for JSON for restartable jobs


    I am working on a application with the following requirements:

    1) a list of ids and associated action is passed to spring batch
    2) the batch process should fetch additional data for the given id and action
    3) the batch process should write all the records (ids + action + data) in a JSON format file and drop it in a rabbitMQ queue for other consumers

    Importantly the job needs to be restartable ... i.e for any reason the application fails in between, it should be able to resume where it failed... ItemWriter should append the records in output file ...

    If the final output file format is XML then the xml infrastructure provided by Spring Batch will do the job clean...

    (ItemStreamReader -> ItemProcessor -> StaxEventItemWriter + StaxWriterCallback)

    but for JSON is there any equivalent for StaxWriterCallback ? how can one achieve similar restartability for JSON ?? do I have to write a similar implementation for JSON or any other out-of-the-box solution exists ?

    Thanks for your attention.

  • #2
    I have raised an JIRA for the same, ... please vote if you find it useful.