activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Kumar <rakeshkr...@yahoo.co.in>
Subject Fw: ActiveMQ message consumer not closing...
Date Thu, 10 Jul 2008 04:52:02 GMT
Hi All,
I could not here anything about this issue that i am facing. can anyone help me out here.

Regards,
Rakesh
----- Forwarded Message ----
From: Rakesh Kumar <rakeshkrcse@yahoo.co.in>
To: dev@activemq.apache.org
Sent: Wednesday, 9 July, 2008 2:21:51 PM
Subject: ActiveMQ message consumer not closing...


Hi All,
 
I have a created the connection and consumers using ActiveMQ, and consumer is waiting for
the recive to complete. when we shutdown the application we close the connection, but close
call of connection does not notify all the consumers (who is waiting for the message to be
recived) after purging all the messages which is causing our application not to shutdown.
we modified the close call the notify all the consumers after purging all the unconsumed mesages
and so 

Following is the changes that i have made in ActiveMQConsumer.cpp class (code block in blue)
void ActiveMQConsumer::close(){
....
            // Purge all the pending messages
            try{
                purgeMessages();
            } catch ( ActiveMQException& ex ){
                if( !haveException ){
                    ex.setMark( __FILE__, __LINE__ );
                    error = ex;
                    haveException = true;
                }
            }

         synchronized( &unconsumedMessages )
         {
                unconsumedMessages.notifyAll();
         }
...
}

can anyone let me know why this has not been done?
 
Thanks for the reply in advance...
 
Regards,
Rakesh
consumer->receive() call is able to come out of the wait and shutdown of application happens
properly


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message