Tips for using Neon + Pulse + tRPC for real-time updates
I'm on the Pro plan, which guarantees "real-time" updates, Neon setup completed, Prisma client initialized using
withPulse()
and everything looks like it is setup correctly. However, new events from Pulse seem to arrive either very late or not arrive at all, regardless if I'm using stream()
or subscribe()
.
Here's my tRPC router:
And my frontend code:
It seems like subscribe()
doesn't deliver any events, while stream()
delivers them in order, but very very late (can be several minutes after the actual database update).4 Replies
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the
#ask-ai
channel awaits if you're curious!I keep seeing Pulse events arriving with really long delays and I'm not sure why that's happening
Hey @xeno 👋
What is your email id or GitHub handle?
I would like to take a look at logs for your workspace
hi - it's [email protected]
Using Neon, getting no error messages
I thought it might be a tRPC issue, but other subscriptions I had never terminated by themselves. So my guess is
ends after a short while.