Package org.activemq.message

Examples of org.activemq.message.ActiveMQMessage.incrementDeliveryCount()


                                }
                                catch (InterruptedException e) {
                                }
                            }
                            //incremenent delivery count
                            msg.incrementDeliveryCount();
                        }
                        if (!pointer.getContainer().isDeadLetterQueue()
                                && (msg.isExpired() || msg.getDeliveryCount() >= redeliveryPolicy
                                        .getMaximumRetryCount())) {
                            if (msg.isExpired()) {
View Full Code Here


                        for (Iterator iter = ackList.iterator(); iter.hasNext();) {
                           
                            DurableMessagePointer messagePointer = (DurableMessagePointer) iter.next();
                            ActiveMQMessage message = messagePointer.getMessage();
                            message.setJMSRedelivered(true);
                            if (message.incrementDeliveryCount() >= redeliveryPolicy.getMaximumRetryCount()) {
                                if (log.isDebugEnabled()){
                                    log.debug("Message: " + message + " has exceeded its retry count");
                                }
                                // TODO: see if we can use the deadLetterPolicy of the container that dispatched the message.
                                deadLetterPolicy.sendToDeadLetter(message);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.