Video není dostupné.
Omlouváme se.

Pub/Sub API - Jonathan Fox - Dreamforce 2022 - Developer Theatre Recap Session

Sdílet
Vložit
  • čas přidán 17. 08. 2024
  • A quick run down of the session that I (Jonathan Fox) did for Dreamforce 22 on the Developer Theatre stage for the Developer Track, covering the Pub/Sub API

Komentáře • 7

  • @sudharsanc180
    @sudharsanc180 Před rokem +1

    Love from Bangalore ❤️ 🇮🇳

  • @jefersonspencer
    @jefersonspencer Před rokem

    Thanks a lot for sharing this material, it is really easy to follow.

  • @akashdeep8229
    @akashdeep8229 Před rokem

    Can we reference this API in LWC components? as existing empAPI don't work outside lightning experience.

    • @JFoxUK
      @JFoxUK  Před rokem

      Hi!
      I'm not sure what situation you mean? - You can subscribe via empAPI as that doesn't differentiate between Streaming/PubSub as you are defining the Data/Event message you are subscribing to. As you're LWC is on platform, as you would with any other record, your LWC would call and Apex class to either 'publish' a platform event or change a record triggering CDC.
      If this is not the situation you are referencing, are you meaning when using 'Lightning out' otherwise I'm not sure how you're using LWC off platform?

    • @akashdeep8229
      @akashdeep8229 Před rokem

      @@JFoxUK hey thanks for Prompt response.
      I was asking for the scenario when we want to use empApi in Experience cloud.
      We had a custom LWC based experience cloud site where we wanted to know the CDC event but unfortunately empAPI is not supported in Experience cloud at the moment.
      Hope you got my situation?

    • @JFoxUK
      @JFoxUK  Před rokem

      @@akashdeep8229 There are workarounds to that where I have seen people try to make a CometD client in an LWC to subscribe etc, though you may be best just using your LWC to poll a record for the change via Apex.

    • @akashdeep8229
      @akashdeep8229 Před rokem

      @@JFoxUKThanks,
      Yeah, I went through these workarounds.
      CometD : Enterprise won't approve it for Prod because of 3rd party library.
      Polling: This will have significant impact on the performance if we poll using setInterval.
      As Pub/sub api is getting away from cometD I was just guessing if we can use it in LWC like ui/api.