function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ValeryValery 

Updates are not dilivered intermittently - Anyone experience the same?

Hello,

I have a very basic setup with my SFDC custom page listening for updates.

For testing purposes I made the script as simple as possible:

 

$.cometd.subscribe('/topic/allcontacts', function(message) {
            var idJSON = JSON.stringify(message.data.sobject.Id);
            alert('idJSON = ' + idJSON);
}

In 95% cases page gets the updates as expected, but sometimes it doesn't. 

For my tests I was adding an email to Contact objects using WebServices API, the very same action fires notification almost always, but once in 20 times or so it doesn't.

Has anybody experienced the same problem?

 

Thanks,

Valery 

VM_SFDCVM_SFDC

Following are the situations where an event may not get delivered:

 

- the client doesn't have sharing access to the record.

- Subscription (cometd session) times out. When the client reconnects, for the time window during which it was unsubscribed it will not receive any events.

- If two or more updates happen in quick succession (within the same second or so) on the same record, you will get the event corresponding to the latest update only.

- Suppose a record got modified and WHERE condition were satisfied and Salesforce decided to send an event out. But just before the event was delivered the record got modified such that the WHERE condition doesn't match anymore, the event won't be delivered. This is because the WHERE conditions are evaluated again just before the delivery.

 

Do you think any of the above might have applied to you? How fast are you generating your events?

 

-- Vinod.