>From within a Transformer I detect an error, which is a temporary error, such 
>as failure to get a connection to an external microservice.

A typical scenario is that Kuberbetes is starting up a bunch of pods, of which 
mine is one, and they come up in the wrong order. This is perfectly normal, and 
the correct behaviour is for your application to terminate - it'll be restarted 
later, and it should try again, and in due course it'll work.

So, inside Transformer.transform() I get one of these errors. I want to 
terminate the application, without of course committing the record currently 
being processed, so that on application restart it re-processes this message 
and everything works fine.

How should I do this? System.exit() or something more sophisticated?

Tim Ward

The contents of this email and any attachment are confidential to the intended 
recipient(s). If you are not an intended recipient: (i) do not use, disclose, 
distribute, copy or publish this email or its contents; (ii) please contact the 
sender immediately; and (iii) delete this email. Our privacy policy is 
available here: https://origamienergy.com/privacy-policy/. Origami Energy 
Limited (company number 8619644); Origami Storage Limited (company number 
10436515) and OSSPV001 Limited (company number 10933403), each registered in 
England and each with a registered office at: Ashcombe Court, Woolsack Way, 
Godalming, GU7 1LQ.

Reply via email to