You need to buy a perfect hummingbird feeder with a rubber gasket to prevent your feeder from leakage but if your feeder is still leaking then you need to hang your feeder in shade or partial shade.
Make sure the cleaning the of your feeder with hot water on regular basis.