Alfalfa isn't good for rats or hamsters
Firstly it is not an easily digested material(for rats,hamsters it is slightly digestible with minimal nutritional value).Secondly,it will mold as it is a food product(this is a serious health risk,and is precisely why corn cob is unsafe).Third,there are always going to be additives in any pellet which if rabbit specific can be unsafe!The hamster version are food,not litter,and should never be used as such for safety reasons.
Any form of litter or substrate must not mold,and must be completely safe(including digestible).