|
As of October 27th, please open all new issues in the Red Hat Customer Portal . |
|
On Spring and multiple connections.
With CACHE_NONE (0), multiple connections will be used. With any other cache level, a single connection will be shared by a message listener container so that it can cache the sessions and consumers. I think adding a second route, using a second activemq component is the best way to get concurrency. In this way, spring can manage the concurrent consumers and use a single connection with full caching. I did not find any stuck messages with the default prefetch (1000) 10 concurrent consumers getting through 100,000 messages. The camel context I used, based on the use case, is in svn : http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/test/resources/org/apache/activemq/camel/transactedconsume.xml?view=co&revision=1162175&content-type=text%2Fplain&pathrev=1162175
When we use CACHE_NONE, we don't get any consumer caching from the ActiveMQConnectionPool. I think add a consumer cache makes sense as in enhancement once the prefetch messages are available by matching users with consumers or doing round robin allocation and expiry of pooled consumers. To get better scale out performance with multiple concurrent consumer and connections, we need to resolve the synchronization around transaction completion. This requires a rethink of an existing bug fix but makes sense as the store is build for concurrency in this way. This fix would be in KahaDB only. It looks like the synchronization in the AMQ store has been there from inception so it may be too late to fix that. Linking to the reworked apache issue https://issues.apache.org/jira/browse/AMQ-2868
This fix will be in the 5.6 release
roll this into the next 5.5.x release
reopen pending merge to 5.5.x branch
|
||||||||||||||||||||||||||||||||||||||||||||
reopened issue at apache: https://issues.apache.org/jira/browse/AMQ-2868
On the stuck messages in spring with prefetch=1000, we should be able to configure spring to keep X concurrent consumers active such that messages do not get stuck. Torsten is working out that config as I type. If that is not possible, we may need to implement some workaround to make that possible.
Short term, I think the solution will be to move away from prefetch=1 via an alternative fix to the missing messages.