Open elefeint opened 4 years ago
Has this been addressed? In other words, could one add errorChannel
handler that will be invoked instead of nacking messages? Thanks
This was done for the subscription side (for a Spring Cloud Stream sink), but not for publishing side (for a Spring Cloud Stream source).
Which one is your usecase?
Thanks @elefeint , I've tried this but with a global errorChannel
instead and it isn't working for me, for some reason.
@dinvlad Replacing this line with @ServiceActivator(inputChannel = "errorChannel")
captures the error for me. There are two things that could be tripping you up:
1) Spring Cloud Stream won't consider an error handed off to the global error handler "handled", and will propagate an error back to the binder.
2) If a stream-specific my-topic.my-group.errors
has a listener, there is no longer an error to propagate to the global channel; the process completes successfully.
In the future, please create a new issue with any relevant information about what you tried and what the expected outcome was -- this makes it easier for developers to find useful threads in the future.
OK, thanks for clarifying @elefeint - I was under the impression I could get a global "catch all", but looks like that's not how it works. I'm assuming this behavior is not specific to PubSub?
Right; this is how Spring Cloud Stream works -- here is a relevant SO explanation.
Per Spring Cloud Stream
errorChannelEnabled
docs,We don't use the
errorChannel
parameter when creating producer message handler at all right now.I've clarified the title that this relates to the Publisher errors.