The most performant deuterium-tritium (DT) plasma discharges realized by the Joint European Torus (JET) tokamak in the recent DT campaign have produced neutron yields on the order of 1018 n/s. At such high neutron yields, gamma-ray spectroscopy measurements with scintillators are challenging as events from the neutron-induced background often dominate over the signal, leading to a significant fraction of pileup events and instability of the photodetector gain along with the consequent degradation of the reconstructed spectrum. Here, we describe the solutions adopted for the tangential lanthanum bromide spectrometer installed at JET. A data acquisition system with free streaming mode digitization capabilities for the entire duration of the discharge has been used to solve dead-time related issues and a data reconstruction code with pileup recovery and photodetector gain drift restoration has been implemented for off-line analysis of the data. This work focuses on the acquired data storage and parsing, with a detailed explanation of the pileup recovery and gain drift restoration algorithms.