Fixed many findbugs warnings
Fix message id concurrent access