1

I have a lwc that works with Event Platforms, but event limits are exceeded and I can't reduce them. Is there any functionality or method that can refresh my component in real time without platform events?.

1 Answer 1

0

Sometimes money is an answer, consider buying an addon to increase the limit.

If it's 1 component talking to another component on same page and telling it to rerender - look into Lightning Message Service. It's not perfect (couldn't get it to work on mobile) but could be good enough for you.

When all else fails - consider handmade polling. What if you use window.setTimeout() and call apex function say every 5 seconds to check if stuff changed. It'll be network-intensive but could be good enough to fetch fresh data.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer, I also thought of querying the database from lwc; but Im not sure if there are a limit of queries per day on Sforce?, because I'll call my method every X seconds by Y numbers of users.
it doesn't count as API access, you should be fine. If the operation is expensive and rarely changes you could consider using Platform Cache. 1 user runs the query, you realise stuff changed, write result to cache + timestamp maybe, next user comes and checks cache first? if it's from last X seconds - grabs the value as is without calculation fresh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.