Disclosed is an ostomy device with an adhesive wafer for attachment to a skinsurface (S) of a user and a collectingbag (8) or collecting output from a stoma. The collecting bag is connected tothe adhesive wafer, and the adhesive wafer has athrough-going hole (6) for accommodating the stoma (7) of the user. Theadhesive wafer includes a backing layer (3), a firstswitchable adhesive composition (2), a second absorbent adhesive composition(1), and a release liner, and the second adhesive layer has acentral portion with a first thickness and an edge portion with a secondthickness, the first thickness being larger than the secondthickness.