Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
In a previous spring integration application, I was able to
subscribe
to the application
errorChannel
and my failed messages, sent out-bound, would end up in my (pre-defined) handler.
However, now I am attempting to implement the same pattern, in a larger application, that has a
pre-existing in-bound
setup and I am no longer able to be pick up on the errorChannel.
Most alarming to me, is a reference to:
<int:publish-subscribe-channel id="errorChannel" task-executor="errorChannelExecutor"/>
When I start up this application, with my inclusion, I no longer see the following reassuring messages:
No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
Adding {logging-channel-adapter:o.s.i.errorLogger} as a subscriber to the 'errorChannel' channel
Channel'o.s.c.s.C.errorChannel' has 2 subscriber(s).
Do you think that the int:publish-subscribe-channel is overriding
my access to the application errorChannel?
Why does it no longer reference the default errorChannel in the log?
Is there a way that I can define an alternate error channel that is solely concerned with out-bound connections?
–
–
–
–
When using async task executors, exceptions caught by the executor are sent to a channel called errorChannel by default.
If you define such a channel, it overrides the default which would otherwise be created by the framework (and the logging adapter that is subscribed to it, is not subscribed; you have to do that if you define your own channel).
For inbound channel adapters/gateways that are message-driven (e.g. http, amqp etc), where do don't have a downstream async executor, you have to explicitly set the error-channel property if you want exceptions to go there.
–
–
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.