Why would Russia want to even get out of those contracts? If Europe is willing to pay, they will gladly supply gas, as they have done for many many decades. Even at the peak of the cold war, they were reliably supplying gas to Western Germany for example. It is very lucrative for them. And in any case, why do contracts between Russia and Europe even matter at this point. Any party can just do whatever they want.
There is no point is "sending a message", it's very obvious that it is possible to blow up an underwater pipeline. Anyone worth sending a message to would have already known its possible.
The obvious real motivation here is to prevent any negotiation over re-opening the pipeline.