This is good question because actually this is one of the topic we discussed how to use.
basically は is more common and used often. I'll talk about situation.
In first one with は, this means "I" will eat rice. I don't know somebody else will eat.
In second one with が, this means I will chose to eat rice. So somebody else can't choose rice.
So for example when you order something in restaurant, you basically need to use はbecause your friend's order doesn't matter with your order. However, when you eat dessert, you find set menu which suggests you a couple of different flavor ice for share such as vanilla and chocolate.
In this case, your friend can't eat chocolate ice.
But finally if you don't order set one.
In this case, your friend can eat chocolate ice because they order separately.