reworked example to use an ObjectMessage and a BasicDBObject instead of a TextMessage.