Closed sabbyanandan closed 4 years ago
Hi @rgonciarz I ran your application and it starts fine standalone using java -jar build/libs/reactive-0.0.1-SNAPSHOT.jar --spring.cloud.stream.kafka.binder.producer-properties.value.serializer=org.apache.kafka.common.serialization.StringSerializer
. Do you need to send any data to the Kafka topic to reproduce what you are seeing?
@rgonciarz We were able to get to the bottom of this issue. It turned out that there were some issues with the way native encoding works with reactive producers. It is now addressed through this commit: https://github.com/spring-cloud/spring-cloud-stream/commit/5b04295570f79d9bc9347c90f3412c2242febf5e
The changes are backported to 3.0.x of Spring Cloud Stream (https://github.com/spring-cloud/spring-cloud-stream/commit/f22c8f6ace8608a46287bdc866acce3a68edf78d), so the next minor release (3.0.9
) will have these fixes.
If you are trying it locally before the release, make sure that you have the following snapshot dependencies in your project:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream</artifactId>
<version>3.0.9.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-context</artifactId>
<version>3.0.11.BUILD-SNAPSHOT</version>
</dependency>
Thank you
you saved my day. TY
@rgonciarz commented on Thu Oct 08 2020
Describe the issue
Dispatcher has no subscribers when value serializer is set for reactive producer in Spring boot 2.3.3. It works fine with when the following setting is default and not set:
spring.cloud.stream.kafka.binder.producer-properties.value.serializer: org.apache.kafka.common.serialization.StringSerializer
In Spring Boot 2.3.4 I experience a different behavior. When I with or without value serializer NPE is thrown: Kafka consumer cannot be created, NPE is thrown when starting the app (KafkaMessageListenerContainer)
To Reproduce I created a small project that may help to reproduce the issue:
https://github.com/rgonciarz/reactive-topology-chain/tree/reactive-function-no-value-serialization - working version with no value serializer set
Steps to reproduce the behavior:
spring.cloud.stream.kafka.binder.producer-properties.value.serializer: org.apache.kafka.common.serialization.StringSerializer
or checkout the branch: https://github.com/rgonciarz/reactive-topology-chain/tree/reactive-function-with-producer-value-serialization - does not work when value serializer is set
Affected version: 2.3.3, 2.3.4