-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The StreamTransformer
must remove a IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE
header from the output message after resource is closed.
#9792
Comments
That's correct.
where you indeed ca declare a
On the other hand the mentioned Spring Integration I also think that the mentioned Please, confirm how my suggestions work for you - and we can repurpose this issue for the |
Hi Artem, Yes, I had seen But your confirmation that For reference I have followed this: Transformer-Header Filter Thanks! |
Not sure why, because that is typical for any property settings on the bean.
Thank you for confirming about the Either way, changing the subject of the issue to remove |
StreamTransformer
must remove a IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE
header from the output message after resource is closed.
Calling the setter isn't much, yes. If you just pass it any ObjectMapper.
Sorry, I had made a typo! |
In what version(s) of Spring Integration are you seeing this issue?
Observed with 6.1.0 and 6.3.4
Describe the bug
ObjectMapper from JacksonUtils.enhancedObjectMapper() used by KafkaProducerMessageHandler (through new DefaultKafkaHeaderMapper()) is not using
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
To Reproduce
Add
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
to Spring Boot (tested with 3.1.0 & 3.3.4) application.properties.Using SFTP adapter to input file (and using StreamTransformer) and then producing output to a kafka topic.
Due to a closable session (for SFTP), the MessageHeaders on the call to
DefaultKafkaHeaderMapper.fromHeaders(MessageHeaders headers, Headers target)
, contains an extra non-String closableResource header. This is expected per SI documentation.But this header object then fails to serialise!
In 6.1.0 it produces a debug log, but in 6.3.4 it produces an error log (both with stacktrace).
Expected behavior
Using the
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
application property, the logic should have bypassed the exception throwing, but this property has no effect.Sample
Log entries from 6.3.4:
The text was updated successfully, but these errors were encountered: