Chemical dosing is a commonly used strategy for mitigating sewer corrosion and odour problems caused by sulfide production. Prediction of sewage flow variation in real-time is critical for the optimization of chemical dosing to achieve cost-effective mitigation of hydrogen sulfide (H 2 S). Autoregressive (AR) models have previously been used for real-time sewage prediction. However, the prediction showed significant delays in wet weather conditions. In this paper, autoregressive with exogenous inputs (ARX) models are employed to reduce the delays with rainfall data used as model inputs. The model is applied to predicting sewage flows at two real-life sewage pumping stations (SPSs) with different hydraulic characteristics and climatic conditions. The calibrated models were capable of predicting flow rates in both cases, much more accurately than previously developed AR models under wet weather conditions. Simulation of on-line chemical dosing control based on the predicted flows showed excellent sulfide mitigation performance at reduced cost.