why does the filament of a bulb does not melt though it heats more than 3400 degree celcius

Well, it doesn't get that hot. Typical temps are 2200C to 3000C. Any standard reference will tell you that. If temp is over 3400C, the filament melts.

A better inquiry is vaporization. Below the mp, any metal starts to vaporize. So I urge you to explore why ordinary light bulbs of 25 w or more are filled with nitrogen and xenon. Hint: consider convection currents.