Argha : checking for memory usage with sleep after every attempt to send a batch of messages.