XMPP a.k.a. Jabber, a communication protocol for message-oriented middleware is probably the most mature technology for free and federated instant messaging. (IRC is far older, of course.) On 2019-01-04 we can celebrate the 20th anniversary of the first XMPP server release:
In the last twenty years, we have seen protocols and services come and go, but XMPP, an IETF standard, is here to stay. It is backed by an international community of developers, does not depend on a single company, and is enhanced continuously by the XSF. Btw.: XMPP is not only used for chatting, but also for IoT, WebRTC, micro-blogging and social networks!
PS: Ge0rG pointed to the link to the original announcement on Slashdot. It reads: