We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Affects: 2.1.3.RELEASE
Hi, I can't handle SockJsMessageDeliveryException in my Spring app. Spring boot version: 2.1.3.RELEASE
releated stackoverflow question
https://stackoverflow.com/questions/61204651/how-can-i-handle-sockjsmessagedeliveryexception-in-spring-app
I tried:
@MessageExceptionHandler({SockJsMessageDeliveryException.class}) public void handle(SockJsMessageDeliveryException e) { log.error("Handled websocket exception: " + e.getClass().getSimpleName()); }
and also:
public class SilentErrorSimpMessagingTemplate extends SimpMessagingTemplate { private final SimpMessagingTemplate simpMessagingTemplate; SilentErrorSimpMessagingTemplate(SimpMessagingTemplate simpMessagingTemplate) { super(simpMessagingTemplate.getMessageChannel()); simpMessagingTemplate.setMessageConverter(new MappingJackson2MessageConverter()); this.simpMessagingTemplate = simpMessagingTemplate; } @Override public void convertAndSendToUser(@NotNull String user, @NotNull String destination, @NotNull Object payload) throws MessagingException { try { simpMessagingTemplate.convertAndSendToUser(user, destination, payload); } catch (SockJsMessageDeliveryException e) { log.error("Socket send error: " + e.getClass().getSimpleName()); } } }
The text was updated successfully, but these errors were encountered:
This may be a duplicate of #24986. How do you want to handle the issue?
Sorry, something went wrong.
Avoid logging this exception is enough for me. Thank you for fast feedback.
rstoyanchev
No branches or pull requests
Affects: 2.1.3.RELEASE
Hi,
I can't handle SockJsMessageDeliveryException in my Spring app. Spring boot version:
2.1.3.RELEASE
releated stackoverflow question
https://stackoverflow.com/questions/61204651/how-can-i-handle-sockjsmessagedeliveryexception-in-spring-app
I tried:
and also:
The text was updated successfully, but these errors were encountered: