Messaging apps don't receive messages when on wifi with screen locked
I think your issue is related to the OS ,as discussed in this forum 
Link ,maybe a new update from Samsung might fix this issue.You should contact Samsung service ,some guy exchanged his Samsung S6 over this issue as mentioned in the discussion