Khong
NNovu
•Created by Khong on 12/17/2023 in #🚀│general
Cancelling Delayed Jobs Edge Case
Hi Novu team!
We have this problem where if we make a delayed broadcast to many users, say, an announcement of some upcoming event made by an admin. Let's say as soon as the admin hit the "send" button, they realize immediately that the sent announcement has wrong details. We have implemented a button that when pressed, triggers the cancel triggered event endpoint (https://docs.novu.co/api-reference/events/cancel-triggered-event). While that works most of the time, sometimes it doesn't.
We have a lot of users on staging; currently, it takes around 1 minute for all jobs to be chunked and added to the subscriber process queue. If I try cancelling the triggered event within this one minute window, some jobs won't be cancelled because they don't yet exist at the point
cancel-triggered-event
is called (basically in the middle of this method https://github.com/novuhq/novu/blob/next/packages/application-generic/src/usecases/trigger-broadcast/trigger-broadcast.usecase.ts#L49-L75).
Is there a workaround for this or am I missing something? A possible workaround I can think of would be some ways of finding out somehow whether all jobs with a transaction id have been scheduled. We can disable the cancel delayed notification button in the meantime. I could also just assume that the jobs creation will always take 1 - 2 minutes, but that'd be the last resort.
Thanks in advance!3 replies
NNovu
•Created by Khong on 12/16/2023 in #🚀│general
Make QUEUE_CHUNK_SIZE configurable via env var?
https://github.com/search?q=repo%3Anovuhq%2Fnovu%20QUEUE_CHUNK_SIZE&type=code
Is there any specific reason why queue chunk size was hard coded to 100? We are fiddling around with various settings to tune the performance of our infra and came across this value.
Can the size of the queue chunk can have a significant impact on the throughput of the total broadcast time if we had a lot of subscribers?
7 replies
NNovu
•Created by Khong on 12/9/2023 in #🚀│general
No Notification When Running Novu from Source
Hi!
When trying to run novu from source, I was not able to see any websocket notification. Not sure why. When everything was running from docker images, the notification got sent to my frontend app just fine.
I have made sure that all the ports are correct and that there are no errors in the console. The frontend app was able to fetch data from novu backend, but when I make new notifications, the ws connection remained silent; nothing happened (needed to refresh to see new data in my new feed)
Thanks in advance.
7 replies
NNovu
•Created by Khong on 10/25/2023 in #💬│support
Obtaining Digest Data
Hi all!
We have a use case where we want to show certain types of notification UI on the frontend based on the number of digested events. Our UI is a bit complex, so writing html in Novu's admin panel is impractical for us.
Is it possible to obtain any of the following:
- if a message that the user received is a digested one
- the payload of all the digested messages (the user receives just one payload)
Thanks!
5 replies