...
- Deprecate (and later remove) the internal system property REMOVE_FROM_QUEUE_ON_EXCEPTION, but detect if it is set to false and support existing behavior (infinite retries)
- Create a new callback API that will be executed when an exception is returned with the acknowledgement from the receiver
- Provide an example implementation of the callback that saves events with exceptions returned from the receiver in a 'dead-letter' queue on the sender (on disk)
- Add 2 new properties for the gateway receiver to control when to send the acknowledgement with the exceptions:
- the number of retries for events failing with an exception
- the wait time between retries
...
- Deprecate existing internal boolean system property: REMOVE_FROM_QUEUE_ON_EXCEPTION
- Continue to support default behavior if boolean set to false by setting # retries on receiver to -1
Create new Java API
Define callback API for senders to set callback to dispatchers
Invoke If sender is configured with a callback, invoke the callback if batch exception occurs prior to batch removal
Implement a default callback API (see item 5 below)
Add parameters properties on gateway receiver factory for to specify # retries for a failed event and wait time between retries.
Modify Gfsh commands
Add option to gfsh ‘create gateway sender’ command to specify custom callback
Add options to gfsh ‘create gateway receiver’ command to set # retries and wait time between retries
Store new options in cluster config
Sender: callback implementation
Receiver: # of retries and wait time between retries
Add support in cache.xml for specifying new callback for gateway sender and setting new options for gateway receiver
Create example implementation of Sender callback that writes event(s) and associated exceptions to a file
Security features
Define privileges needed to deploy and configure sender callback
With security, callback should only write eventId's and exceptions, i.e. no entry values should be written to disk
Add logging and statistics for callback
Log messages for gateway receiver for start time and results of retries
Add statistics and MBean for callbacks in-progress, completed, # and duration
...