Your late 2014 iMac is running a version of Mac OS X that is many generations below what it's capable of. OS X 10.11 El Capitan has been unsupported for several years now. Both the OS and that version of iMessage no longer receive security updates from Apple and either may be the cause of your issue.
It would behoove you to upgrade your OS to one that is much more recent and up to date with current protocols and standards.
Your iMac is older, but I believe it can serve you well for quite a few more years if you upgrade it. Your iMac can be upgraded to any of these OS versions: 10.12 Sierra, 10.13 High Sierra, 10.14 Mojave, 10.15 Catalina, or macOS 11 Big Sur.
Should you decide to upgrade to Catalina or Big Sur, be advised that you'll need to also upgrade much of your current application software, including printer and other peripheral device drivers because they are likely 32-bit programs and Mojave is the last version of the macOS that supports them. Catalina and Big Sur require and support only 64-bit software.
For more info, pease see: How to download macOS - Apple Support
Before you upgrade the OS, it is strongly advised that you create a backup of your current software and documents. How to back up your Mac - Official Apple Support