Spring Integration Executor Channel using annotations code sample

前端 未结 1 444
耶瑟儿~
耶瑟儿~ 2021-01-26 05:48

My system diagram is attached.

System Diagram

HOW THE FLOW WORKS:

The spring integration flow reads input from a json file on C:\\ and p

相关标签:
1条回答
  • 2021-01-26 06:52

    You don't really need an ExecutorChannel - simply set ignoreFailures to true on the pub/sub channel...

    /**
     * Specify whether failures for one or more of the handlers should be
     * ignored. By default this is <code>false</code> meaning that an Exception
     * will be thrown whenever a handler fails. To override this and suppress
     * Exceptions, set the value to <code>true</code>.
     * @param ignoreFailures true if failures should be ignored.
     */
    public void setIgnoreFailures(boolean ignoreFailures) {
    

    If you want to log or otherwise handle exceptions on the DB store, you can add an ExpressionEvaluatingRequesthandlerAdvice to the component that does the DB store.

    If you really want an ExecutorChannel, the DSL section of the reference manual has an example.

    .channel(MessageChannels.executor("executorChannel", this.taskExecutor))
    
    0 讨论(0)
提交回复
热议问题