As others have said, it’s obligatory. I used to tell my First Communion students that, for Sunday Masses, this essentially meant that had to finish eating before they got in the car – not an onerous discipline. There are, of course, exceptions for those who must eat because of a medical condition.