Well, the Villar-Perosa of 1914 managed about 1500 RPM, and in a twin-gun configuration was a reasonably effective defensive weapon for the aircraft of the early days of WWI. Barrel overheating was minimalized in three ways: the weapon fired from an open bolt using a pistol-caliber cartridge, from a limited capacity magazine, and rode in the 100 mph+ airflow of the observer's position in the aircraft.
The MG42 derived beltfed guns get around barrel overheating with frequent barrel changes, around every 500 rounds or so per my experience with German tank crews, who run off longer bursts than their Infantry countertparts who have to haul ammo on their backs. The WWI German Gast MG, chambered for the standard German 7,92mm rifle/MG cartridge, managed 1600 RPM [single mechanism/double barrelled, and again, magazine fed [2x 180-round drums.]
By the end of WWII, the Germans had machine cannon for aircraft developed to the point that two or three projectiles were in the barrel at the same time. See Chinn for details.