The LWC Docs describe the replayId
parameter in the lightning\empApi
subscribe
method as follows (emphasis is mine):
Indicates what point in the stream to replay events from. Specify -1 to get new events from the tip of the stream, -2 to replay from the last saved event, or a specific event replay ID to get all saved and new events after that ID.
I would like to replay from the first saved event (i.e. I want to get all the events that are still persisting). Am I out of luck?
Use case: a custom LWC on the Opportunity detail page where users may send related Attachments to an external system. In some cases, due to governor limits around heap and callout size, this process will use a @future
method. The @future
method will publish events pertaining to the success or failure of the operation. I would like to be able to present information about recent attempts to send files, so users can check on the status even if they navigate away from the page and come back later.
-2
is what I want, despite the wording in the docs. Thanks!