Rochdale started the match strongly, and won two corners in the opening five minutes. From the second corner, central defender Bennett headed in to open the scoring.
Joe Bunney tried to double the lead a minute later, but his shot was saved by Sam Walker.
Sammie Szmodics failed to reply with two chances, before Ian Henderson headed over the bar at another Rochdale corner.
In the 55th minute, Ian Henderson scored against his former club. Loanee Jack O'Connell floated a free kick into the penalty area and Henderson volleyed in from a tight angle to double Rochdale's lead.
Porter clawed a goal back in the 63rd minute, powering a penalty into the middle of the net after Massey was fouled by Michael Rose.
Massey's attempt to equalise went over the crossbar before Allen missed the net at the other end.
Macauley Bonne replaced Porter with 12 minutes remaining and nearly made an immediate impact, but his shot was parried by Jones.
Colchester stay in 22nd in League One, while Rochdale rise to 13th.