mirror of https://github.com/apache/activemq.git
[AMQ-8012] Fix for ConcurrentModificationException in SubQueueSelectorCacheBroker
- Remove non-thread-safe method getSelectors() - Update all references to use the thread-safe getSelectorsForDestination() method
This commit is contained in:
parent
6c07033c58
commit
083acb9691
|
@ -77,7 +77,7 @@ public class SelectorAwareVirtualTopicInterceptor extends VirtualTopicIntercepto
|
|||
LOG.debug("No active consumer match found. Will try cache if configured...");
|
||||
|
||||
if (selectorCachePlugin != null) {
|
||||
final Set<String> selectors = selectorCachePlugin.getSelector(dest.getActiveMQDestination().getQualifiedName());
|
||||
final Set<String> selectors = selectorCachePlugin.getSelectorsForDestination(dest.getActiveMQDestination().getQualifiedName());
|
||||
if (selectors != null) {
|
||||
for (String selector : selectors) {
|
||||
try {
|
||||
|
|
|
@ -248,13 +248,6 @@ public class SubQueueSelectorCacheBroker extends BrokerFilter implements Runnabl
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The JMS selector for the specified {@code destination}
|
||||
*/
|
||||
public Set<String> getSelector(final String destination) {
|
||||
return subSelectorCache.get(destination);
|
||||
}
|
||||
|
||||
/**
|
||||
* Persist the selector cache every {@code MAX_PERSIST_INTERVAL}ms.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue