novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.91k stars 3.69k forks source link

🐛 Bug Report: Notification messages are getting missed during Concurrent Notifications Request #4439

Open Dushyant-YM opened 1 year ago

Dushyant-YM commented 1 year ago

📜 Description

When we trigger multiple notifications at the same time or within few seconds, we do not get all the notification messages in events provided by novu hooks. When we reload the page or next event comes then some or all missed messages comes in that particular event.

👟 Reproduction steps

  1. Trigger Novu API (https://api.novu.co/v1/events/trigger) for concurrent requests from JMeter tool.
  2. See messages/ data provided by Novu hooks(useNotifications, useFetchNotifications or useSocket notification_received event) on client side.
  3. sometimes we miss messages or sometimes we get all messages then again repeat from step 1.

👍 Expected behavior

  1. We should get all messages in events , no messages should get dropped.

👎 Actual Behavior with Screenshots

  1. Messages should not be missed in events even though there are concurrent notifications.

Novu version

v0.19.0

npm version

9.5.0

node version

v18.15.0

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Dushyant-YM commented 1 year ago

Code snippet.

Codesandbox Link : https://codesandbox.io/s/shy-fire-znsnzl

UseCase : Notifications messages contains food order details to be fullfilled/cancelled , when new notification is received means new food order is received/cancelled , we notify user in web app through sound to either prepare food or cancel.

techmannih commented 1 year ago

Hello @davidsoderberg , I want to work on this issue please assign me

davidsoderberg commented 1 year ago

@techmannih you are now assigned