Hello experts,

Can you tell how to properly end receiving msg in Asynch mode? i use the
code below to do it, but even after i press the enter key, the program still
runs:

[code]
consumer.setMessageListener(new ActiveMqListener());            
consumer.start();
while(true){
                        BufferedReader in = new BufferedReader(new
InputStreamReader(System.in));
                        in.readLine();
                        System.out.print("ActiveMQ receive file ended.");
                        
                        //End the program.
                        consumer.stop();  
                        session.close();
                        connection.close();
                        System.exit(0);
}               
[/code]
-- 
View this message in context: 
http://old.nabble.com/how-to-properly-end-msg-receive-in-Async-mode-tp27995765p27995765.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to