Using Spring Cloud Stream how can I route a failed message to a retry kafka topic or to…
- User
Using Spring Cloud Stream how can I route a failed message to a retry kafka topic or to a dead-letter topic based on the failure type that occured?
Assistant
You can configure this via the ErrorMessageProcessor that is injected into the binder. You would set the processor to either forward the error message to a retry topic, or to a dead-letter topic, depending on the failure type.
- User
Can I globally set all binders to use this ErrorMessageProcessor?
Assistant
Yes, you can set the processor on the binder in multi-context mode. This way all binders will use the same processor.
- User
Can I set this from a custom spring boot starter library?
Assistant
Yes, you can set the processor from a custom spring boot starter library by creating a custom binder and setting the processor on it. You can then inject the binder into the application and use it to process error messages.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.