@Override protected boolean matchesForwardingFilter(Message message, final MessageEvaluationContext mec) { boolean match = true; if (mec.getDestination().isQueue() && contains(message.getBrokerPath(), networkBrokerId)) { // potential replay back to origin match = allowReplayWhenNoConsumers && hasNoLocalConsumers(message, mec) && hasNotJustArrived(message); if (match) { LOG.trace("Replaying [{}] for [{}] back to origin in the absence of a local consumer", message.getMessageId(), message.getDestination()); } else { LOG.trace("Suppressing replay of [{}] for [{}] back to origin {}", new Object[]{ message.getMessageId(), message.getDestination(), Arrays.asList(message.getBrokerPath())} ); } } else { // use existing filter logic for topics and non replays match = super.matchesForwardingFilter(message, mec); } if (match && rateLimitExceeded()) { LOG.trace("Throttled network consumer rejecting [{}] for [{}] {}>{}/{}", new Object[]{ message.getMessageId(), message.getDestination(), matchCount, rateLimit, rateDuration }); match = false; } return match; }
@Override protected boolean matchesForwardingFilter(Message message, final MessageEvaluationContext mec) { boolean match = true; if (mec.getDestination().isQueue() && contains(message.getBrokerPath(), networkBrokerId)) { // potential replay back to origin match = allowReplayWhenNoConsumers && hasNoLocalConsumers(message, mec) && hasNotJustArrived(message); if (match) { LOG.trace("Replaying [{}] for [{}] back to origin in the absence of a local consumer", message.getMessageId(), message.getDestination()); } else { LOG.trace("Suppressing replay of [{}] for [{}] back to origin {}", new Object[]{ message.getMessageId(), message.getDestination(), Arrays.asList(message.getBrokerPath())} ); } } else { // use existing filter logic for topics and non replays match = super.matchesForwardingFilter(message, mec); } if (match && rateLimitExceeded()) { LOG.trace("Throttled network consumer rejecting [{}] for [{}] {}>{}/{}", new Object[]{ message.getMessageId(), message.getDestination(), matchCount, rateLimit, rateDuration }); match = false; } return match; }
@Override protected boolean matchesForwardingFilter(Message message, final MessageEvaluationContext mec) { boolean match = true; if (mec.getDestination().isQueue() && contains(message.getBrokerPath(), networkBrokerId)) { // potential replay back to origin match = allowReplayWhenNoConsumers && hasNoLocalConsumers(message, mec) && hasNotJustArrived(message); if (match) { LOG.trace("Replaying [{}] for [{}] back to origin in the absence of a local consumer", message.getMessageId(), message.getDestination()); } else { LOG.trace("Suppressing replay of [{}] for [{}] back to origin {}", new Object[]{ message.getMessageId(), message.getDestination(), Arrays.asList(message.getBrokerPath())} ); } } else { // use existing filter logic for topics and non replays match = super.matchesForwardingFilter(message, mec); } if (match && rateLimitExceeded()) { LOG.trace("Throttled network consumer rejecting [{}] for [{}] {}>{}/{}", new Object[]{ message.getMessageId(), message.getDestination(), matchCount, rateLimit, rateDuration }); match = false; } return match; }
@Override protected boolean matchesForwardingFilter(Message message, final MessageEvaluationContext mec) { boolean match = true; if (mec.getDestination().isQueue() && contains(message.getBrokerPath(), networkBrokerId)) { // potential replay back to origin match = allowReplayWhenNoConsumers && hasNoLocalConsumers(message, mec) && hasNotJustArrived(message); if (match) { LOG.trace("Replaying [{}] for [{}] back to origin in the absence of a local consumer", message.getMessageId(), message.getDestination()); } else { LOG.trace("Suppressing replay of [{}] for [{}] back to origin {}", new Object[]{ message.getMessageId(), message.getDestination(), Arrays.asList(message.getBrokerPath())} ); } } else { // use existing filter logic for topics and non replays match = super.matchesForwardingFilter(message, mec); } if (match && rateLimitExceeded()) { LOG.trace("Throttled network consumer rejecting [{}] for [{}] {}>{}/{}", new Object[]{ message.getMessageId(), message.getDestination(), matchCount, rateLimit, rateDuration }); match = false; } return match; }