Current Behaviour
A message queued for retry with the same key as another queued message will replace that message in the retry queue. This is undesirable as often the same key is used on multiple messages for partitioning purposes. We must remove the requirement that each message sent to the retry topic must have a unique key. This behaviour is a holdover from a previous implementation that used KTable for consuming the retry topic.
Proposed Behaviour
- Allow each message sent to the retry topic to be queued independently, is.e. there should be no requirement for unique keys.
- Ensure the original message key will be set for the outbound message sent to the origin topic.
- Support a mechanism to allow overwriting of queued messages, if desired. For example, via a new header
x-ibm-retry-replace set to true.