0

I have a custom object called AdobeMeeting__c and platform event Meeting__e. If I did the changes in AdobeMeeting__c object,I need to push the notification to my external system(java subscriber ).

For that I have created a trigger on AdobeMeeting__c object and it push the changes to platform event Meeting__e.

But here my questions

  1. how can Java subscriber monitor salesforce platform events which are in EventBus.

  2. how salesforce knows java subscriber received platform event messages successfully and is there any messages Sitting in EventBus.

  3. lets say saleforce published platform event messages to Java subscriber. but Java subscriber connection down for 1 day and not able receive platform event messages . now how can i monitor that messages which are in Eventbus

Can any One tell me the flow how can I achieve this.

1

Firstly, you may wish to use Change Data Capture instead, as it posts change events for you with no need for custom code in an Apex trigger. This appears to be a textbook use case for CDC.

how can Java subscriber monitor salesforce platform events which are in EventBus.

Salesforce provides example code. I'd recommend reviewing the Platform Events Developer Guide and specifically the Example: Subscribe to and Replay Events Using a Java Client (EMP Connector)

how salesforce knows java subscriber received platform event messages successfully and is there any messages Sitting in EventBus.

Salesforce doesn't track the receipt status of each subscriber for each event message. It is the responsibility of the subscriber to process messages and to take advantage of the replay functionality to request re-delivery (see below).

lets say saleforce published platform event messages to Java subscriber. but Java subscriber connection down for 1 day and not able receive platform event messages . now how can i monitor that messages which are in Eventbus

The event bus is not a persistent store. Salesforce provides a 24-hour replay window during which a subscriber can request that events are re-delivered to cope with such a connectivity gap.

Detailed information about how replay works is in the Streaming API Message Durability documentation. From that document:

A subscriber can choose which events to receive, such as all events within the retention window or starting after a particular event. The default is to receive only the new events sent after subscribing. Events outside the 24-hour retention period are discarded.

When your client reestablishes a connection to the server, it can request to have the entire retention window redelivered to it, or request all events subsequent to a specific replay Id that it previously received. Detailed examples are in the above documentation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.