private boolean hasNoLocalConsumers(final Message message, final MessageEvaluationContext mec) { Destination regionDestination = (Destination) mec.getMessageReference().getRegionDestination(); List<Subscription> consumers = regionDestination.getConsumers(); for (Subscription sub : consumers) { if (!sub.getConsumerInfo().isNetworkSubscription() && !sub.getConsumerInfo().isBrowser()) { if (!isSelectorAware()) { LOG.trace("Not replaying [{}] for [{}] to origin due to existing local consumer: {}", new Object[]{ message.getMessageId(), message.getDestination(), sub.getConsumerInfo() }); return false; } else { try { if (sub.matches(message, mec)) { LOG.trace("Not replaying [{}] for [{}] to origin due to existing selector matching local consumer: {}", new Object[]{ message.getMessageId(), message.getDestination(), sub.getConsumerInfo() }); return false; } } catch (Exception ignored) {} } } } return true; }
private boolean hasNoLocalConsumers(final Message message, final MessageEvaluationContext mec) { Destination regionDestination = (Destination) mec.getMessageReference().getRegionDestination(); List<Subscription> consumers = regionDestination.getConsumers(); for (Subscription sub : consumers) { if (!sub.getConsumerInfo().isNetworkSubscription() && !sub.getConsumerInfo().isBrowser()) { LOG.trace("Not replaying [{}] for [{}] to origin due to existing local consumer: {}", new Object[]{ message.getMessageId(), message.getDestination(), sub.getConsumerInfo() }); return false; } } return true; }
private boolean hasNoLocalConsumers(final Message message, final MessageEvaluationContext mec) { Destination regionDestination = (Destination) mec.getMessageReference().getRegionDestination(); List<Subscription> consumers = regionDestination.getConsumers(); for (Subscription sub : consumers) { if (!sub.getConsumerInfo().isNetworkSubscription() && !sub.getConsumerInfo().isBrowser()) { LOG.trace("Not replaying [{}] for [{}] to origin due to existing local consumer: {}", new Object[]{ message.getMessageId(), message.getDestination(), sub.getConsumerInfo() }); return false; } } return true; }
private boolean hasNoLocalConsumers(final Message message, final MessageEvaluationContext mec) { Destination regionDestination = (Destination) mec.getMessageReference().getRegionDestination(); List<Subscription> consumers = regionDestination.getConsumers(); for (Subscription sub : consumers) { if (!sub.getConsumerInfo().isNetworkSubscription() && !sub.getConsumerInfo().isBrowser()) { LOG.trace("Not replaying [{}] for [{}] to origin due to existing local consumer: {}", new Object[]{ message.getMessageId(), message.getDestination(), sub.getConsumerInfo() }); return false; } } return true; }