The present invention relates to a valve device at dispensers which are adapted for dispensing portions of liquid or semi-liquid products (2), preferably foodstuff, from containers, and which have vacuum pumps (5) for generating a negative pressure in passage systems (6) through which the products (2) are dispensed from the containers. The valve device is a magnetic valve device (9) which is designed as a permanent magnet device with a valve body (9d) which automatically shifts or changes position when the vacuum pump (5) has emptied a container (e.g. 3), such that said vacuum pump (5) immediately thereafter can empty another container (e.g. 4).