-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
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
Expose a setExceptionListener method in DefaultJmsListenerContainerFactory [SPR-17570] #22102
Comments
Stéphane Nicoll commented There is a What am I missing? |
Juergen Hoeller commented Any particular use case for a custom |
leachad commented Juergen Hoeller and Stéphane Nicoll from what I read of the spring-jms docs, the ErrorHandler is used for message handling exceptions. I'm looking at injecting a custom exception listener for connection exceptions, not for message handling exceptions Specifically, I'm trying to hook into the exception handling that logs this error
I attempted to use an instance of If there were some way to have inject a
This code snippet is in JmsListenerEndpointRegistry.java:141-146 version 4.3.19.RELEASE |
leachad commented I was able to concoct a workaround for my use case and now have telemetry in place for monitoring connections using this exception listener. Here's what I did. Seems to work with fine running my pub sub tests locally
public class MyContainerFactory private ExceptionListener exceptionListener; /**
if (this.exceptionListener != null) { }
|
leachad opened SPR-17570 and commented
As a user of the
spring-jms
artifacts, I would like to be able to register an exception listener on the container(s) that get generated using theDefaultJmsListenerContainerFactory
.Currently, this method is not configurable in the
DefaultJmsListenerContainerFactory
object butsetErrorHandler
for message processing is.Reference URL: https://stackoverflow.com/questions/53639178/why-does-defaultjmslistenercontainerfactory-not-expose-setexceptionlistener-meth/53639840#53639840
The text was updated successfully, but these errors were encountered: