Platform Event : Limits and Publish Behaviour

Viewed 25

I am working with Platform Event to carry out business operations on Objects to avoid hitting governance limit for each transaction.

Problem: for each single Account record update, if I hit 50 SOQL query limit, then anytime 3 records are getting updated, I will constantly hit 101 Too many queries.

Solution: create\raise a Platform Event for each 3 account record updates, so each would get a new transaction (is it ?)

Queries

  1. When I raise 3 Platform Events then will they be clubbed (bulkified) and all would be executed under a single transaction ? (so falling into the same problem that I am trying to solve. currently I got to see the 101 too many queries issue under then PE execution logs)

  2. If I change Publish behaviour from After Commit --> Publish Immediately, will that execute trigger under 3 transactions ?

  3. Is there a way to raise 3 Platform Events that would have their own 3 separate transactions ?

  4. Is PE execution sync or async ? To know the SOQL governance limit.

0 Answers
Related