Well, yes, an open compost pile will attract rodents and flies. Possums, racoons and birds too. I didn't even think about that because there are not enough cats roaming the earth to kill all of the mice and rats that live around our homestead. The flies aren't a consideration since the heap is so far from the house that they are not even noticed (but really I've never seen that many flies, even with fresh stuff in the pile).
A drum bin of some sort will probably suit your needs much better.