A device for the treatment of a feedstock containing solid particles, the treatment preferentially being drying or torrefaction, the device comprising a furnace (301) comprising an enclosure of which the longitudinal axis is vertical in the operating position, the enclosure comprising at least an inlet (316) and an outlet (304) for said feedstock and at least an inlet (317) and an outlet (318) for a gas able to come into contact with the solid particles, characterized in that the device comprises a feedstock recovery system (306) for recovering said feedstock, the feedstock recovery system (306) comprising at least a recovery line (305) connected to the feedstock outlet (304) of the enclosure, the recovery line (305) being in fluidic connection with a sampling and/or analysis means (319), for the in-situ or ex-situ analysis of the feedstock so as to measure a parameter indicative of the treatment of the feedstock, the recovery line (305) comprising at least two lines in parallel downstream of the sampling and/or analysis means (319), in the direction of circulation of the feedstock, at least one of the lines being a removal line (310), the removal line preferably leading to a storage tank (308), and at least another line being a recirculation line (312) leading to a port (303) allowing the feedstock to be reintroduced into the furnace (301), each removal or recirculation line comprising a throttling means (309, 313).