fixed message acknowledging, added msgAck() and msgClose() functions and onMessageEnd event