You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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...
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
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
The text was updated successfully, but these errors were encountered: