Townsend spent his first season as a reliever for Rice, which went to the College World Series and finished second in the nation in ERA. Townsend was 2–1 with a 2.28 ERA and six saves as a freshman, recording 51 strikeouts, 22 walks, and 10 wild pitches in 51.1 innings. As a sophomore in 2003, he struggled with his control in his first appearance but came into his own as a weekday starter, pitching Rice's non-conference games against rival Houston and Big 12 opponents. He finished the season 11–2 with a 2.20 ERA, beating defending national champion Texas twice, including once in the CWS, Houston three times, and single wins over Nebraska, Baylor, and Texas A&M. The consensus all-American also recorded five saves as a reliever, mostly in Western Athletic Conference games, and led the WAC with a school-record 164 strikeouts (broken by Eddie Degerman in 2006).