CAS-1316: moved the task of sending messages to the httpclient