You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When implementing a consumer class with generic types that implement java.util.Consumer, we have observed that depending on how the consumer bean is defined, the deserialization of messages works correctly or not.
We have created this repository that describes this situation, defining the Consumer beans "correctly" or "incorrectly".
We understand that it should work both ways. Additionally, it is a good practice and recommended by Spring to define the implementation as the bean output rather than the interface.
To Reproduce
Steps to reproduce the behavior:
Define a Class that implements Consumer with types variables
Describe the issue
When implementing a consumer class with generic types that implement
java.util.Consumer
, we have observed that depending on how the consumer bean is defined, the deserialization of messages works correctly or not.We have created this repository that describes this situation, defining the Consumer beans "correctly" or "incorrectly".
We understand that it should work both ways. Additionally, it is a good practice and recommended by Spring to define the implementation as the bean output rather than the interface.
To Reproduce
Steps to reproduce the behavior:
Version of the framework
Spring-Boot 3.4.2
Spring Cloud 2024.0.0
Observed outcome
The message is not deserialized and arrives in byte[].
For batch mode the message payload is null in the list of messages.
Expected behavior
The message is deserialized correctly by the converter.
Additional context
The same behavior occurs for consumer in batch-mode.
Works OK when the bean is defined in this manner:
The text was updated successfully, but these errors were encountered: