-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
What we need: Spring DefaultMessageListenerContainer releasing worker tasks based upon a pure inactivity counter. That is, the counter that counts how many times a "null" message has been received. For example, if the receiveTimeout is set to 1 second and the (fictive, to be created) property maxIdleReceivesPerTask is set to 60, the DefaultMessageListenerContainer would release the worker task after 60 times subsequently receiving a null value, and thus, be released 60 seconds after the last activity.
"But this already exists" : well, there is indeed idleTaskExecutionLimit and the maxMessagesPerTask, but if my understanding is correct, the maxMessagesPerTask has the side effect that it also releases the task when not being idle. In those cases the task is immediately re-scheduled, but this is something we want to avoid. In our case we want to set maxMessagesPerTask to "-1" but still let the worker task be released after a pre-configured amount of null messages have been received.
Is this change possible?