Rotary feedthrough, comprising a mechanical seal having a sliding ring and a counter ring , which are elastically pressurized against each other at a relative rotational speed to seal a sealing gap in the direction of an axis of rotation , wherein the sliding ring is axially displaceable along the axis of rotation in the direction of the counter ring to compensate for wear in the sealing gap ; having a wear sensor, which comprises a magnet arranged in a fixed manner in the sliding ring and a Hall sensor opposite the magnet in the radial direction relative to the axis of rotation for detecting a current axial position of the magnet ; having a rotary feedthrough housing and a shaft mounted rotatably about the axis of rotation in the rotary feedthrough housing ; having a medium-carrying channel which extends through the rotary feedthrough housing and the shaft and is sealed off from the environment by means of the mechanical seal ; wherein the Hall sensor is arranged in the rotary feedthrough housing and comprises its own sensor housing ; wherein the sensor housing is mounted in the rotary feedthrough housing , characterized in that the sensor housing encloses a Hall generator with electrical connection pins and a section of a sensor cable which is electrically connected to the connection pins inside the sensor housing , and the sensor housing comprises an axial stop surface abutting in the direction of the axis of rotation in the rotary feedthrough housing , with which an axial position of the sensor housing in the rotary feedthrough housing is defined in the direction of the axis of rotation . a mechanical seal having a sliding ring and a counter ring , which are elastically pressurized against each other at a relative rotational speed to seal a sealing gap in the direction of an axis of rotation , wherein the sliding ring is axially displaceable along the axis of rotation in the direction of the counter ring to compensate for wear in the sealing gap ; having a wear sensor, which comprises a magnet arranged in a fixed manner in the sliding ring and a Hall sensor opposite the magnet in the radial direction relative to the axis of rotation for detecting a current axial position of the magnet ; having a rotary feedthrough housing and a shaft mounted rotatably about the axis of rotation in the rotary feedthrough housing ; having a medium-carrying channel which extends through the rotary feedthrough housing and the shaft and is sealed off from the environment by means of the mechanical seal ; wherein the Hall sensor is arranged in the rotary feedthrough housing and comprises its own sensor housing ; wherein the sensor housing is mounted in the rotary feedthrough housing , characterized in that the sensor housing encloses a Hall generator with electrical connection pins and a section of a sensor cable which is electrically connected to the connection pins inside the sensor housing , and the sensor housing comprises an axial stop surface abutting in the direction of the axis of rotation in the rotary feedthrough housing , with which an axial position of the sensor housing in the rotary feedthrough housing is defined in the direction of the axis of rotation . <EOS>