Infinite Loop Message Consumer

@TomF
Thank you for your patience
But the acknowledgement is not working for me
Do you have any sample code for acknowledgement?
If I need to add any settings while creating session?

Thanks