Newer Version Available

This content describes an older version of this product. View Latest

Publish and Receive Platform Events

Use EMP Connector to subscribe to a custom platform event that you defined earlier.
To create the Low_Ink__e platform event, follow the steps in Define a Custom Platform Event.
  1. Publish event messages in the Developer Console using Apex. In this example, you publish the Low_Ink__e event messages.
    1. In Salesforce Classic, select your name | Developer Console.
    2. In Lightning Experience, click the quick access menu, and select Developer Console.
    3. Select Debug | Open Execute Anonymous Window.
    4. In the new window and replace the contents with this Apex code snippet.
    5. Click Execute. After the platform event is published, EMP Connector receives an event notification, which is printed in the console. The output is similar to this example.