Description
I have a created an application which creates a connection and consumers using ActiveMQ C++ Client, after running the application 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).
I have seen in the close method of ActiveMQConsumer after purging all the messages there is no call to notifyAll on object unconsumedMessages because of which consumers waiting for the receive does not does not come out of the wait call, 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 our application is working fine.
Following is the changes that i have made in ActiveMQConsumer.cpp class
void ActiveMQConsumer::close(){
....
....
// Purge all the pending messages
try
catch ( ActiveMQException& ex ){
if( !haveException )
}
//Start of additional code
synchronized( &unconsumedMessages )
//End of additional code
....
....
}
can anyone let me know why this has not been done? I think this should be done. please explain if I am missing something