my program exits as soon as I set consumer a message listner, when I expect it to wait for messages until I close the connection.
I have pasted my code in pastbin here : http://pastebin.com/TJm5SuBZ
Please let me know if anything is wrong in my way of implementation.
no exceptions are printed so not sure if I missed any dependancy.