Streaming API for Community 'n' Internal, Platform Events subscription using CometD
Salesforce out of the box Streaming API lightning components like lightning-emp-api do not support Salesforce Communities (Community Experience Cloud). CometD is a great option for these use cases, this supports Streaming API for both Internal and Community uses, lightning emp api is built based this event and message routing bus. CometD connects to Salesforce like an external application through the Salesforce CometD endpoint. You can refer to the below link for more information about the CometD endpoint https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm Implementation of CometD on a Lightning Web Component: Download CometD from https://download.cometd.org/ Not all versions are compatible with Salesforce platform, one version that worked for me is 3.1.1 upload cometd.js to static resource from this path 'cometd-3.1.1\cometd-javascript\common\src\main\webapp\js\cometd' in the downloaded file. Co