Farfetch / kafkaflow-retry-extensions

Kafka Flow Retry Patterns Extensions
https://farfetch.github.io/kafkaflow-retry-extensions/
MIT License
55 stars 7 forks source link

Support nullable Partition Key #10

Open martinhonovais opened 3 years ago

martinhonovais commented 3 years ago

On class RetryDurableQueueRepository.cs there are two points where we should guard the Message Key against thrown and exception in cast operation.

Points to review:

  1. AddIfQueueExistsAsync
  2. SaveToQueueAsync

We should guard against a rise in an error if the key is not of the type byte array.

We should have some logic when the Message Key has a null value. To fill the SeachGroupKey we should use a Guid to guarantee that we have a queue for each message.

-- Remember to develop protection to not repeat the insertion of the same message. Maybe a tuple such as <topic; partition; offset> can be used to avoid duplicated messages.

a related issue on kafkaflow - https://github.com/Farfetch/kafkaflow/issues/373 - https://github.com/Farfetch/kafkaflow/pull/374