Affects: 5.2.6.RELEASE
I added my custom encoder and decoder like following.
ExchangeStrategies
.empty()
.codecs(configurer -> {
configurer.defaultCodecs().maxInMemorySize(properties.getMaxInMemorySize());
configurer.customCodecs().registerWithDefaultConfig(encoder);
configurer.customCodecs().registerWithDefaultConfig(decoder);
})
.build();
But there is no messageWriters when writing body with BodyInserts.fromValue().
It seems that encoder and decoder that I added above are not registered at ExchangeStrategies.
I think following code block has bug. Why put all readers and writers from this to other? It seems that this and other are swapped.
If it is a bug, I would like to create a PR. :)
Yes, that looks like a bug.
Feel free to submit a PR with the fix, and please make sure to include a test that fails before the fix and passes afterwards.
This should be backported to 5.1.x as well, but I'm holding off on creating the backport issue with the assumption that a PR from @dlsrb6342 will supersede this issue.
@dlsrb6342 Do you think you'll find time to submit the PR in the coming week?
It would be good to have it in place in time for 5.2.7.
@sbrannen
Please have a look #25149
Superseded by #25149.