changed method for getting messages from the queue.
New method delivers vast improvement on speed (6msgs/s to more than 600msgs/s)