simplified message callback interface and removed data_size parameter