The present disclosure relates to an in-line compact measuring device, for example for optical measurements, comprising a housing having a process connection intended to be connected to a process vessel connection complementary to the process connection; at least one sensor assembly arranged in the housing; and a measuring circuit that is connected to the sensor assembly and is arranged in the housing. The in-line compact measuring device has at least one fluid line in thermally conductive contact with at least one housing wall of the housing, which fluid line can be connected to a cooling fluid supply arranged outside the housing.