I have a processor which transforms byte[]
payloads into MyClass
payloads:
@Slf4j
@EnableBinding(Processor.class)
public class MyDecode
You are seeing 3 attempts because that's the default retry configuration for the input channel in the binder.
There's a bug in the binder in that if the converter can't convert the message, it tries to create a message with a null
payload.
The reason it can't convert the payload is because it sees the inbound content-type (presumably application/octet-stream
) and it can't convert from that to JSON.
The work around is to add a file to the classpath:
META-INF/spring.integration.properties
and add
spring.integration.readOnly.headers=contentType
to it.
That prevents the propagation of the inbound content type header to the outbound message.
This requires spring integration 4.3.2 or higher.
In a future release of SCSt, this will be set by default.