4

Using Spring Cloud Stream and the Kafka binder, I have a very simple Processor bound to an SI flow:

    @Bean
    @Autowired
    public IntegrationFlow inputFlow(Thrower thrower) {
        return IntegrationFlows
            .from(ApplicationBinding.INPUT)
            .handle(thrower))
            .channel("nullChannel")
            .get()
    }

The thrower bean simply throws a RuntimeException.

The RuntimeException seems to get wrapped by a MessageProcessingException and dumped to the console.

How can I silence that console output and keep all other behavior the same?

I have configured spring.cloud.stream.bindings.error.destination=errorChannel but binding a handler to that (like so) doesn't seem to get me any events to play with:

    @ServiceActivator(inputChannel = "errorChannel")
    public void errors(ErrorMessage em) {
        log.info("Heyooo {}", em);
    }
Gabriel Bauman
  • 2,270
  • 1
  • 22
  • 36

0 Answers0