messages stopped working on my iMac computer
The registration can fail and need to be re-established. Before you contact Apple support, I would open messages on the Mac and sign out of your AppleID. 


Sign out of messages with your AppleID
Check the date / time in the Mac in system preferences. Within 60 seconds of reality should be fine, closer is better of course, but it’s not sub second critical. 
Sign back in to Messages (quit the app and retry after signing out if it’s stubborn). https://support.apple.com/en-us/HT204408


The system should log an error to the diagnostics or the screen if your sign in fails.