mongo connection and message socket