Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Spring DMLC releasing worker tasks based upon a pure inactivity counter #26195

@koen-serneels

Description

@koen-serneels

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: messagingIssues in messaging modules (jms, messaging)status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions