apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.56k stars 1.17k forks source link

add support for multi partition kafka topics #5398

Closed bdoyle0182 closed 1 year ago

bdoyle0182 commented 1 year ago

Description

This will add support to configure a certain topic class to have a specified number of partitions by including a partitions config in the configuration for that topic class. This currently does not include the consumer metric reporting for delay and lag since it assumes a single partition topic so it uses only partition 0 to emit that metric. But this change will unblock from attempting to use multiple partitions for your kafka topics by not having the producer use specify a key for the producer record such that the kafka messages are always hashed to the same consistent partition.

Related issue and scope

My changes affect the following components

Types of changes

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #5398 (291b3b2) into master (de3e0a8) will decrease coverage by 1.03%. The diff coverage is 100.00%.

:exclamation: Current head 291b3b2 differs from pull request most recent head db7e4c8. Consider uploading reports for the commit db7e4c8 to get more accurate results

@@            Coverage Diff             @@
##           master    #5398      +/-   ##
==========================================
- Coverage   76.83%   75.80%   -1.03%     
==========================================
  Files         240      240              
  Lines       14596    14596              
  Branches      672      671       -1     
==========================================
- Hits        11215    11065     -150     
- Misses       3381     3531     +150     
Impacted Files Coverage Δ
...whisk/connector/kafka/KafkaConsumerConnector.scala 59.15% <ø> (-22.54%) :arrow_down:
...whisk/connector/kafka/KafkaMessagingProvider.scala 70.73% <100.00%> (ø)
...whisk/connector/kafka/KafkaProducerConnector.scala 56.09% <100.00%> (-31.71%) :arrow_down:

... and 29 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more