Javadoc
Sets the key generator for identifying retried items. Retry across transaction boundaries requires items to be
identified when they are encountered again. The default strategy is to use the items themselves, relying on their
own implementation to ensure that they can be identified. Often a key generator is not necessary as long as the
items have reliable hash code and equals implementations, or the reader is not transactional (the default) and
the item processor either is itself not transactional (not the default) or does not create new items.