Newer Version Available

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

Subscribe to Publish Status Events with a CometD Client (EMP Connector)

To subscribe to publish status events with EMP Connector or another CometD client, supply this channel: /event/PublishStatusEvent.

This example shows the payload received for a publish status of success and contains information for two events. Because the publish operations were successful, the replay ID for each event is available in the Replay field and the FailureReason and StatusCode fields are empty. The EventUuid field correlates the publish result of each event with the original publish call.

1{
2  "schema": "tklL37cct1eXnqi_yPIS7w",
3  "payload": {
4    "Status": "SUCCESS",
5    "AdditionalInfo": null,
6    "CreatedById": "005xx000001X83aAAC",
7    "CreatedDate": "2020-08-06T20:16:44.400Z",
8    "PublishStatusDetails": [
9      {
10        "Replay": 7,
11        "EventUuid": "6ba5db7e-c27b-4a67-a3c5-cf425ffcaf53",
12        "FailureReason": null,
13        "StatusCode": null
14      },
15      {
16        "Replay": 10,
17        "EventUuid": "5a520ebe-6ac5-49b3-a3e0-6f9f81361c79",
18        "FailureReason": null,
19        "StatusCode": null
20      }
21    ],
22    "Topic": "Order_Event__e"
23  }
24}

This example shows the payload for a publish status of failure and contains information for two events. Because the publish operations failed, the replay IDs are not available in the Replay fields. The FailureReason and StatusCode fields contain information about the error. The EventUuid field correlates the publish result of each event with the original publish call.

1{
2  "schema": "tklL37cct1eXnqi_yPIS7w",
3  "payload": {
4    "Status": "FAILURE",
5    "AdditionalInfo": null,
6    "CreatedById": "005xx000001X83aAAC",
7    "CreatedDate": "2020-08-06T20:20:23.573Z",
8    "PublishStatusDetails": [
9      {
10        "Replay": null,
11        "EventUuid": "e981b488-81f3-4fcc-bd6f-f7033c9d7ac3",
12        "FailureReason": 
13          "The platform event message could not be published. Try again later.",
14        "StatusCode": "PLATFORM_EVENT_PUBLISH_FAILED"
15      },
16      {
17        "Replay": null,
18        "EventUuid": "ed5773c8-6848-4eee-99cf-2d3703cc0da3",
19        "FailureReason": 
20          "The platform event message could not be published. Try again later.",
21        "StatusCode": "PLATFORM_EVENT_PUBLISH_FAILED"
22      }
23    ],
24    "Topic": "Order_Event__e"
25  }
26}