introduced a short thread sleep when accumulating messages to send