spring-boot
spring-boot copied to clipboard
WIP: ReactorKafka auto-configuration (approach 1)
This is a WIP proposal for ReactorKafka auto-configuration. It is a modification of the original proposal in that it leverages the already existing producer/consumer from KafkaProperties as well as supports property hierarchy of KafkaProperties.
There are still tests that need to be fleshed out but I wanted to get something for us to look at before proceeding.
Commit 1
Has nothing to do w/ ReactorKafka and is strictly a refactor to pull up common properties for re-use. This is leveraged by the 2nd commit but it useful on its own.
Commit 2
Add the ReactorKafka auto-config.
NOTE: I know the "ship has sailed" on this going into 2.7x but I left it here (FOR NOW) as ReactorKafka has not yet made it into the latest Reactor BOM for SB3 (seems to have issues w/ Java17 from 1st glance).
NOTE: This approach inserts the RK props in the KP hierarchy - the same approach used by Admin, Producer, Consumer, and Streams clients.
(+) Behaves like the other Kafka clients do and should be easy for Spring Kafka users to grok (+) Allows setting producer/consumer at higher level (or not) and sharing (or not) w/ non-reactor clients (-) The extra layer of overrides (hierarchy) complicates things a bit
@garyrussell I know you advocated for a separate RKP and that would be easy to implement w/ this refactored base properties in commit 1. I do think this approach feels very much like the other clients config props though.
cc: @wilkinsona
@onobc thank you for the PR but why can't we continue collaborating on #30567?
@onobc thank you for the PR but why can't we continue collaborating on #30567?
Hi @snicoll - The direction was unclear and there were enough questions that we wanted to stop the existing proposal to allow some exploration of approaches. The propsals are fairly divergent at this point so I think it makes sense to focus on this more recent one. I thought that we closed the other PR but I see it is open still which is a bit confusing.