scheduleRedelivery(context, messageReference, delay, ++redeliveryCount); } else if (isSendToDlqIfMaxRetriesExceeded()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else { LOG.debug("Discarding message that exceeds max redelivery count({}), {}", maximumRedeliveries, messageReference.getMessageId()); } else if (isFallbackToDeadLetter()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else {
private void validatePolicyDelay(long limit) { final ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")}); for (Object entry : redeliveryPolicyMap.get(matchAll)) { RedeliveryPolicy redeliveryPolicy = (RedeliveryPolicy) entry; validateLimit(limit, redeliveryPolicy); } RedeliveryPolicy defaultEntry = redeliveryPolicyMap.getDefaultEntry(); if (defaultEntry != null) { validateLimit(limit, defaultEntry); } }
@Override public Broker installPlugin(Broker broker) throws Exception { if (!broker.getBrokerService().isSchedulerSupport()) { throw new IllegalStateException("RedeliveryPlugin requires schedulerSupport=true on the broker"); } validatePolicyDelay(1000); return super.installPlugin(broker); }
scheduleRedelivery(context, messageReference, delay, ++redeliveryCount); } else if (isSendToDlqIfMaxRetriesExceeded()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else { LOG.debug("Discarding message that exceeds max redelivery count({}), {}", maximumRedeliveries, messageReference.getMessageId()); } else if (isFallbackToDeadLetter()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else {
@Override public Broker installPlugin(Broker broker) throws Exception { if (!broker.getBrokerService().isSchedulerSupport()) { throw new IllegalStateException("RedeliveryPlugin requires schedulerSupport=true on the broker"); } validatePolicyDelay(1000); return super.installPlugin(broker); }
private void validatePolicyDelay(long limit) { final ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")}); for (Object entry : redeliveryPolicyMap.get(matchAll)) { RedeliveryPolicy redeliveryPolicy = (RedeliveryPolicy) entry; validateLimit(limit, redeliveryPolicy); } RedeliveryPolicy defaultEntry = redeliveryPolicyMap.getDefaultEntry(); if (defaultEntry != null) { validateLimit(limit, defaultEntry); } }
scheduleRedelivery(context, messageReference, delay, ++redeliveryCount); } else if (isSendToDlqIfMaxRetriesExceeded()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else { LOG.debug("Discarding message that exceeds max redelivery count({}), {}", maximumRedeliveries, messageReference.getMessageId()); } else if (isFallbackToDeadLetter()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else {
@Override public Broker installPlugin(Broker broker) throws Exception { if (!broker.getBrokerService().isSchedulerSupport()) { throw new IllegalStateException("RedeliveryPlugin requires schedulerSupport=true on the broker"); } validatePolicyDelay(1000); return super.installPlugin(broker); }
private void validatePolicyDelay(long limit) { final ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")}); for (Object entry : redeliveryPolicyMap.get(matchAll)) { RedeliveryPolicy redeliveryPolicy = (RedeliveryPolicy) entry; validateLimit(limit, redeliveryPolicy); } RedeliveryPolicy defaultEntry = redeliveryPolicyMap.getDefaultEntry(); if (defaultEntry != null) { validateLimit(limit, defaultEntry); } }
scheduleRedelivery(context, messageReference, delay, ++redeliveryCount); } else if (isSendToDlqIfMaxRetriesExceeded()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else { LOG.debug("Discarding message that exceeds max redelivery count({}), {}", maximumRedeliveries, messageReference.getMessageId()); } else if (isFallbackToDeadLetter()) { return super.sendToDeadLetterQueue(context, messageReference, subscription, poisonCause); } else {
@Override public Broker installPlugin(Broker broker) throws Exception { if (!broker.getBrokerService().isSchedulerSupport()) { throw new IllegalStateException("RedeliveryPlugin requires schedulerSupport=true on the broker"); } validatePolicyDelay(1000); return super.installPlugin(broker); }
private void validatePolicyDelay(long limit) { final ActiveMQDestination matchAll = new AnyDestination(new ActiveMQDestination[]{new ActiveMQQueue(">"), new ActiveMQTopic(">")}); for (Object entry : redeliveryPolicyMap.get(matchAll)) { RedeliveryPolicy redeliveryPolicy = (RedeliveryPolicy) entry; validateLimit(limit, redeliveryPolicy); } RedeliveryPolicy defaultEntry = redeliveryPolicyMap.getDefaultEntry(); if (defaultEntry != null) { validateLimit(limit, defaultEntry); } }