- We study analytically the superfluid flow of a Bose-Einstein condensate in a ring geometry in the presence of a rotating barrier. We show that a phase transition breaking a parity symmetry among two topological phases occurs at a critical value of the height of the barrier. Furthermore, a discontinuous (accompanied by hysteresis) phase transition is observed in the ordered phase when changing the angular velocity of the barrier. At the critical point where the hysteresis area vanishes, the chemical potential of the ground state develops a cusp (a discontinuity in the first derivative). Along this path, the jump between the two corresponding states having a different winding number shows analogies with a topological phase transition. We finally study the current-phase relation of the system and compare some of our calculations with published experimental results.