you need to break this down:
- he ended the relationship when she didn’t want to? has this always played on his mind? why did he feel the need to message a girl who, after 3 years, has presumably gotten some closure from him?
- you say she told people and knew it would get back to you. i imagine this influenced him telling you as he knew you would find out anyway.
there’s a reason why he randomly decided to message an ex from years ago who he has apparently told you didn’t want to end it with him. and you need to talk to him about it