Open dakotahNorth opened 5 months ago
9db6cbfa53
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
src/main/java/com/example/helloworld/ManifoldJsonMessageConverter.java
β https://github.com/dakotahNorth/HelloWorldSpringCloudStream/commit/61974a5de79d9bdb717c62fabe1a3d6d7142eae7 Edit
Modify src/main/java/com/example/helloworld/ManifoldJsonMessageConverter.java with contents: In the convertFromInternal method, change the catch block to:
catch (manifold.rt.api.ScriptException e) {
// Log an error message with the details of the exception
log.error("Error converting JSON to object: {}", e.getMessage(), e);
// Return null to allow other converters to be tried or skip the message
return null;
}
This will catch the specific ScriptException, log an error message with the exception details, and return null. Returning null allows Spring Cloud Stream to either try other message converters or skip the message and move on to the next one, rather than retrying this converter endlessly.
I have finished reviewing the code for completeness. I did not find errors for sweep/do_not_endlessly_retry_message_conversio
.
π‘ To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
Stop Spring Cloud Stream from continuing to retry converting messages when a message can't be converted.
Instead, log that the message can't be converted and then process the next message.
The exception that is thrown is below ...
Checklist
- [X] Modify `src/main/java/com/example/helloworld/ManifoldJsonMessageConverter.java` β https://github.com/dakotahNorth/HelloWorldSpringCloudStream/commit/61974a5de79d9bdb717c62fabe1a3d6d7142eae7 [Edit](https://github.com/dakotahNorth/HelloWorldSpringCloudStream/edit/sweep/do_not_endlessly_retry_message_conversio/src/main/java/com/example/helloworld/ManifoldJsonMessageConverter.java)