Added better error reporting for middleware failures.
Added autoAck of messages.