activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <fancye...@gmail.com>
Subject does AUTO_ACKNOWLEDGE guarantee once and only once semantic for queue consumer?
Date Mon, 24 Feb 2014 11:07:19 GMT
I've read the jms specification and questions by google such as
http://stackoverflow.com/questions/2991412/anyone-know-exactly-which-jms-messages-will-be-redelivered-in-client-acknowledge
. But I still confused about it.
   Another question is: how can a consumer tell the broker to
redelevery a message to other consumers(maybe again to this consumer)
   e.g. we have some real time tasks and here is code:
   class MyConsumer implements MessageListener{

        public void onMessage(Message msg) {
            doPhrase1();
            if(leftTime < avgTime1){
                //Tell broker I can't finish it in time,
                //you should redelevery to other consumers
                //do some cleanup job
            }
            doPhrase2();
            if(leftTime < avgTime1){
                //Tell broker I can't finish it in time,
                //you should redelevery to other consumers
                //do some cleanup job
            }
            doPhrase3();
        }

Mime
View raw message