In an attempt to mitigate the effect of deadlocks in my application I am considering setting up my ActiveMQ server to abort slow consumers. I can get this working OK, but the problem is that my Spring DefaultMessageListenerContainer
never restarts the closed consumers, somewhat defeating the point of detecting when a consumer is blocked.
I have tried the following:
- Changed the cache level of the container to
CACHE_NONE
ensure it's not a problem with it keeping hold of a closed consumer/session - Switched to a raw
ActiveMQConnectionFactory
rather than aPooledConnectionFactory
to ensure it's not the pool keeping hold of a closed session/connection - Reverted to the default
SimpleAsyncTaskExecutor
rather than a pooled executor to ensure it's not a problem with keeping hold of threads that are somehow stuck
None of these have worked. Is there a way to get the DefaultMessageListenerContainer
to automatically create new consumers if they are closed by ActiveMQ?