Adding blocking message publisher

Adding support for blocking thread trying to publish a message in case
the in memory queue is full. This makes sure that the message are not
dropped due to slow scribe agent.
Changed the code formatter to apache. All the formatting should be standardised now.