Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-cloud-stream-binder-kafka-reactive ignores message converter configuration for producer message handler #2810

Open
GarryIV opened this issue Sep 15, 2023 · 0 comments

Comments

@GarryIV
Copy link

GarryIV commented Sep 15, 2023

Describe the issue
spring-cloud-stream-binder-kafka-reactive ignores message converter configuration for producer message handler.

It just creates MessagingMessageConverter instance disrespecting user provided properties and beans.
See https://github.com/spring-cloud/spring-cloud-stream/blob/v4.0.4/binders/kafka-binder/spring-cloud-stream-binder-kafka-reactive/src/main/java/org/springframework/cloud/stream/binder/reactorkafka/ReactorKafkaBinder.java#L200

To Reproduce
Steps to reproduce the behavior:

  1. Provide a custom header mapper via spring.cloud.stream.kafka.binder.header-mapper-bean-name
  2. Run app
  3. Producer uses default mapper (while consumer uses overridden one.

Version of the framework
v4.0.4

Expected behavior
org.springframework.cloud.stream.binder.kafka.utils.BindingUtils#getConsumerMessageConverter is used to create a message converter (or any other way you prefer) to respect provided properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants