BITMAG-738 Improve multi-threading for the handling of the messages: Ready for review.