A compact heat exchanger for the heat exchange between a hot gas and a liquid coolant comprising: a) a shell extending according to a longitudinal direction X-X' to allow the passage of the liquid coolant between a liquid coolant inlet/outlet (1.1) and a liquid coolant outlet/inlet (1.2); b) a heat exchange tube bundle for the passage of the hot gas, housed in the shell, extending according to longitudinal direction X-X' between a first fixing baffle located on the hot gas inlet/outlet side, preferably at the inlet, and a second fixing baffle located on the hot gas outlet/inlet side, preferably at the outlet; c) the second fixing baffle is attached to the shell; wherein d) the first fixing baffle is attached to the shell by means of a tubular-shaped manifold element wherein: i. the end of the manifold element located at the hot gas inlet/outlet end according to longitudinal direction X-X' comprises an elastically deformable perimetral collar (5.1) with an outer attachment region (5.3) and an inner attachment region (5.4), wherein the outer attachment region (5.3) has a characteristic diameter that is larger than the characteristic diameter of the inner attachment region (5.4), characteristic diameter being defined as four times the area of the cross section divided by the perimeter of said section, such that - the first baffle is attached to the manifold element through the inner attachment region (5.4) of the manifold element, and - the outer attachment region (5.3) of the manifold element is attached to the shell, the heat exchanger being characterized by ii. at least one tubular segment (5.5) of the manifold element extending according to longitudinal direction X-X' from the perimetral collar (5.1) to the hot gas outlet/inlet side and is housed inside the shell, establishing a perimetral chamber in fluid communication with the liquid coolant inlet/outlet (1.1) and in fluid communication with the inside of the shell. a) a shell extending according to a longitudinal direction X-X' to allow the passage of the liquid coolant between a liquid coolant inlet/outlet (1.1) and a liquid coolant outlet/inlet (1.2); b) a heat exchange tube bundle for the passage of the hot gas, housed in the shell, extending according to longitudinal direction X-X' between a first fixing baffle located on the hot gas inlet/outlet side, preferably at the inlet, and a second fixing baffle located on the hot gas outlet/inlet side, preferably at the outlet; c) the second fixing baffle is attached to the shell; wherein d) the first fixing baffle is attached to the shell by means of a tubular-shaped manifold element wherein: i. the end of the manifold element located at the hot gas inlet/outlet end according to longitudinal direction X-X' comprises an elastically deformable perimetral collar (5.1) with an outer attachment region (5.3) and an inner attachment region (5.4), wherein the outer attachment region (5.3) has a characteristic diameter that is larger than the characteristic diameter of the inner attachment region (5.4), characteristic diameter being defined as four times the area of the cross section divided by the perimeter of said section, such that - the first baffle is attached to the manifold element through the inner attachment region (5.4) of the manifold element, and - the outer attachment region (5.3) of the manifold element is attached to the shell, the heat exchanger being characterized by ii. at least one tubular segment (5.5) of the manifold element extending according to longitudinal direction X-X' from the perimetral collar (5.1) to the hot gas outlet/inlet side and is housed inside the shell, establishing a perimetral chamber in fluid communication with the liquid coolant inlet/outlet (1.1) and in fluid communication with the inside of the shell. i. the end of the manifold element located at the hot gas inlet/outlet end according to longitudinal direction X-X' comprises an elastically deformable perimetral collar (5.1) with an outer attachment region (5.3) and an inner attachment region (5.4), wherein the outer attachment region (5.3) has a characteristic diameter that is larger than the characteristic diameter of the inner attachment region (5.4), characteristic diameter being defined as four times the area of the cross section divided by the perimeter of said section, such that - the first baffle is attached to the manifold element through the inner attachment region (5.4) of the manifold element, and - the outer attachment region (5.3) of the manifold element is attached to the shell, the heat exchanger being characterized by - the first baffle is attached to the manifold element through the inner attachment region (5.4) of the manifold element, and - the outer attachment region (5.3) of the manifold element is attached to the shell, the heat exchanger being characterized by ii. at least one tubular segment (5.5) of the manifold element extending according to longitudinal direction X-X' from the perimetral collar (5.1) to the hot gas outlet/inlet side and is housed inside the shell, establishing a perimetral chamber in fluid communication with the liquid coolant inlet/outlet (1.1) and in fluid communication with the inside of the shell.