Message handler / database handler deadlock

The switch to ArrayBlockingQueue introduced a deadlock scenario between
the message handler and the database handler