If an event is emitted which has headers._exception != undefined, error handling is triggered for the processor which emitted the event.
If an exception is raised during a call of a processor, headers._exception must be set and the error handling is triggered for the processor which raised the exception.
headers._exception.numberOfAttempts contains the number of attempts so far.
Error handling should be done as follows:
headers._exception.numberOfAttempts contains the number of attempts so far.