---
schema_version: "1"
id: 69132b763516cab93f7aedb9479ac50f81a3cd63348fff6b9d16365a3a4c1c57
title: Communicating Across the DOM with Lightning Message Service
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/message-channel/message-channel-intro.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-intro.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 09eace7b8b2e3d1cf6296945e64c3a475a9c738c54c571fefe6e341b041186c1
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Communicating Across the DOM with Lightning Message Service

Use Lightning message service to communicate across the DOM within a Lightning page. Communicate between Visualforce pages embedded in the same Lightning page, Aura components, and Lightning web components, including components in a utility bar and pop-out utilities. Choose whether a component subscribes to messages from the entire application, or from only the active area.

If you're switching from Salesforce Classic to Lightning Experience, you can build Lightning web components that can communicate with existing Visualforce pages or Aura components. You can also use Lightning message service to communicate with softphones via Open CTI.

**important:** Lightning message service is available in Lightning Experience and as a beta feature for Lightning components used in Experience Builder sites.

To access Lightning message service in Aura, use the `lightning:messageChannel` component. A message is a serializable JSON object. Examples of data that you can pass in a message include strings, numbers, booleans, and objects. A message can’t contain functions and symbols. The `lightning:messageChannel` component is only available in Lightning Experience.

- **[Create a Message Channel](https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-create.md)**


    To create a `lightning:messageChannel` component in your org, use the LightningMessageChannel metadata type and append it with `__c`. The message channel isn’t a custom object, it just uses the same suffix.

- **[Publish on a Message Channel](https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-publish.md)**


    To publish a message on a message channel, include a `lightning:messageChannel` component in your Aura component and use the `publish()` method in your Aura component's controller file.

- **[Subscribe to a Message Channel](https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-subscribe.md)**


    To subscribe to a message channel, create a handler method to run when it receives a message.

- **[Lightning Message Service Limitations](https://developer.salesforce.com/docs/platform/aura-platform/guide/message-channel-considerations.md)**


    Keep the following in mind when working with Lightning message service.

**See Also**

- [Blog: Lightning Message Service](https://developer.salesforce.com/blogs/2019/10/lightning-message-service-developer-preview.html)
- [_Lightning Web Components Developer Guide_: Communicating Across the DOM with Lightning Message Service](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/message_channel_intro.htm)
- [_Visualforce Developer Guide_: Communicating Across the DOM with Lightning Message Service](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/message_channel_intro.htm)
- [_Open CTI Developer Guide_: Lightning Message Service Methods for Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_methods_lms.htm)
