Not the most elegant solution, but both programs could have a "hotfolder" they monitor for message files. When they detect a file, they read the message and delete it.
Another similar approach is to used a shared sqlite db with a queue table that is has a "source" and "message" column (think file approach just inside of a db).
A third approach could use sockets/http server that each application hosts, then when one app needs to notify the other, a post request/write to socket can be done. A bit more complicated but doesn't involve polling something.
Just some suggestions, there's probably a better way, I'm just not a mac user.