-
Enhancement
-
Resolution: Unresolved
-
Minor
-
6.3
When using a JMS Selector on an ActiveMQ Queue, the selector is limited to only the messages held in memory. The entire queue is not paged through to find a match. This can cause a hung consumer if the destinations memory is currently full and no messages match the selector.
This is not an ideal use case for selectors, however if you are stuck with the this implementation at the moment the following can be used to help:
- Increase the destination memoryLimit to accommodate all message
- Increase the maxPageSize to maximum number of messages expected for the destination
- Use a prefetch of 1 or 0 on the consumer
Jakub Korab also provides an interesting solution to this problem:
http://stackoverflow.com/questions/21035571/consumers-selector-issue-on-activemq