spring-cloud / spring-cloud-stream

Framework for building Event-Driven Microservices
http://cloud.spring.io/spring-cloud-stream
Apache License 2.0
993 stars 606 forks source link

Fix Pulsar binder for Java 21 #2918

Closed onobc closed 6 months ago

onobc commented 6 months ago

Running the Pulsar binder with Java 21 surfaced a bug where the layered binder/binding config props are not properly applied to the targeted consumer/producer builders.

The bug existed before Java 21 and is unrelated.

The binder/binding config props are converted to a Pulsar ProducerConfigurationData object via Jackson. This conversion process iterates over a map of config props. The iteration order of the map changed between Java 17 and 21. This results in object setters getting called in different orders which in turn causes cross field validation errors.

See #2915 for more details