Skip to content
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

Doc: JMS CachingConnectionFactory incompatible with DefaultMessageListenerContainer in some circumstances [SPR-10581] #15210

Closed
spring-projects-issues opened this issue May 23, 2013 · 1 comment
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Daniel Blezek opened SPR-10581 and commented

Using a CachingConnectionFactory in conjunction with a DefaultMessageListenerContainer that implements scaling using maxMessagePerTask can result in JMS messages delivered to cached consumers that are no longer attached to the DefaultMessageListenerContainer. This problem is documented and explained in detail in this forum thread: http://forum.springsource.org/showthread.php?133467-DMLC-maxMessagesPerTask-causes-inability-to-scale-down

Suggested Fix:

Put a comment in the documentation that consumer caching is not compatible with dynamic scaling in DefaultMessageListenerContainer OR issue a warning when a developer attempts to use them together.


Affects: 3.2 GA

Reference URL: http://forum.springsource.org/showthread.php?133467-DMLC-maxMessagesPerTask-causes-inability-to-scale-down

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I've added a warning to DMLC's javadoc for the time being.

We could try to detect a mismatch in configuration at runtime but I'd rather not go that far at this point, since there is always the risk of overreacting to configuration that is perfectly valid within its custom context...

Juergen

@spring-projects-issues spring-projects-issues added the type: documentation A documentation task label Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.2.4 milestone Jan 11, 2019
michaldo added a commit to michaldo/spring-framework that referenced this issue Aug 1, 2020
Issue spring-projects#15210 reports problem with maxMessagePerTask and CachingConnectionFactory. Result of the issue is javadoc section which discourages from CachingConnectionFactory with dynamic scalling.
But dynamic scaling described in the javadoc is achieved by method setMaxConcurrentConsumers, not setMaxMessagePerTask. 
I can't find issue 15210 details, but CachingConnectionFactory is typical setup in Spring world. For example, guide https://github.com/spring-guides/gs-messaging-jms creates context with DefaultMessageListenerContainer + CachingConnectionFactory.

For that reason I assume that DefaultMessageListenerContainer  + CachingConnectionFactory + dynamic scaling with setMaxConcurrentConsumers is correct. I deleted misleading Javadoc section and added relevant discouraging section to Javadoc of method setMaxMessagePerTask

If I am wrong please reject my PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

2 participants