split messages longer than 512 into 512 chunks