Yes! You heard me right you can use Lightning Message Service in Visualforce pages too. But there is a catch.
You can use LMS in Visualforce page only when the Visualforce page component is dragged and dropped on a record page.
Let's look at how to use LMS in Visualforce pages.
Here is the snippet!
This is the Visualforce page that will subscribe to the message channel and starts receiving the data once it's pushed to message channel.