/** * @param node * @param msgContext * @param consumers * @return true if dispatched * @throws Exception * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference, * org.apache.activemq.filter.MessageEvaluationContext, java.util.List) */ public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception { // Big synch here so that only 1 message gets dispatched at a time. // Ensures // Everyone sees the same order. synchronized (consumers) { int count = 0; for (Iterator iter = consumers.iterator(); iter.hasNext();) { Subscription sub = (Subscription)iter.next(); // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; } }
sub.unmatched(node); continue;
public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception { int count = 0; for (Subscription sub : consumers) { // Don't deliver to browsers if (sub.getConsumerInfo().isBrowser()) { continue; } // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; }
/** * @param node * @param msgContext * @param consumers * @return true if dispatched * @throws Exception * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference, * org.apache.activemq.filter.MessageEvaluationContext, java.util.List) */ public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception { // Big synch here so that only 1 message gets dispatched at a time. // Ensures // Everyone sees the same order. synchronized (consumers) { int count = 0; for (Iterator iter = consumers.iterator(); iter.hasNext();) { Subscription sub = (Subscription)iter.next(); // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; } }
/** * @param node * @param msgContext * @param consumers * @return true if dispatched * @throws Exception * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference, * org.apache.activemq.filter.MessageEvaluationContext, java.util.List) */ public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception { // Big synch here so that only 1 message gets dispatched at a time. // Ensures // Everyone sees the same order. synchronized (consumers) { int count = 0; for (Iterator iter = consumers.iterator(); iter.hasNext();) { Subscription sub = (Subscription)iter.next(); // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; } }
/** * @param node * @param msgContext * @param consumers * @return true if dispatched * @throws Exception * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference, * org.apache.activemq.filter.MessageEvaluationContext, java.util.List) */ public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception { // Big synch here so that only 1 message gets dispatched at a time. // Ensures // Everyone sees the same order. synchronized (consumers) { int count = 0; for (Iterator iter = consumers.iterator(); iter.hasNext();) { Subscription sub = (Subscription)iter.next(); // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; } }
sub.unmatched(node); continue;
/** * @param node * @param msgContext * @param consumers * @return true if dispatched * @throws Exception * @see org.apache.activemq.broker.region.policy.DispatchPolicy#dispatch(org.apache.activemq.broker.region.MessageReference, * org.apache.activemq.filter.MessageEvaluationContext, java.util.List) */ public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List consumers) throws Exception { // Big synch here so that only 1 message gets dispatched at a time. // Ensures // Everyone sees the same order. synchronized (consumers) { int count = 0; for (Iterator iter = consumers.iterator(); iter.hasNext();) { Subscription sub = (Subscription)iter.next(); // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; } }
sub.unmatched(node); continue;
sub.unmatched(node); continue;
sub.unmatched(node); continue;
public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception { int count = 0; for (Subscription sub : consumers) { // Don't deliver to browsers if (sub.getConsumerInfo().isBrowser()) { continue; } // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; }
public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception { int count = 0; for (Subscription sub : consumers) { // Don't deliver to browsers if (sub.getConsumerInfo().isBrowser()) { continue; } // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; }
public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception { int count = 0; for (Subscription sub : consumers) { // Don't deliver to browsers if (sub.getConsumerInfo().isBrowser()) { continue; } // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; }
public boolean dispatch(MessageReference node, MessageEvaluationContext msgContext, List<Subscription> consumers) throws Exception { int count = 0; for (Subscription sub : consumers) { // Don't deliver to browsers if (sub.getConsumerInfo().isBrowser()) { continue; } // Only dispatch to interested subscriptions if (!sub.matches(node, msgContext)) { sub.unmatched(node); continue; } sub.add(node); count++; } return count > 0; }