-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Unable to send null payload with KafkaTemplate#send(Message) #2924
Comments
I confirm this as a bug. As a workaround I suggestion to extend that
Would be great if you can contribute the fix. Thank you! |
…(Message), and JsonMessageConverter
…d(Message) and JsonMessageConverter Fixes: spring-projects#2924 Add posibility to send KafkaNull message payload with JsonMessageConverter.
…d(Message) and JsonMessageConverter Fixes: spring-projects#2924 Add posibility to send KafkaNull message payload with JsonMessageConverter. **Cherry-pick to 3.0.x**
Fixes: gh-2924 Add the possibility of sending KafkaNull message payload with JsonMessageConverter. **Cherry-pick to 3.0.x**
Fixes: gh-2924 Add the possibility of sending KafkaNull message payload with JsonMessageConverter. **Cherry-pick to 3.0.x**
Hello, I have a somewhat similar issue in version 3.1.1.
|
So, don't add those |
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.0.11
Describe the bug
Unable to send null message through
KafkaTemplate#send(Message)
.Unable to create
GenericMessage
with null payload.To Reproduce
Expected behavior
Kafka sends null message.
But we get:
IllegalArgumentException: Payload must not be null
We could set
myValue=KafkaNull.INSTANCE;
But JsonMessageConverter inherited classes cannot proccess KafkaNull.
The text was updated successfully, but these errors were encountered: