inital working version for review

@jarv @feanil 
why 10? Given the logic below I assume that `get_messages` will leave messages in the queue right?