You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the docs don’t clearly state it (at least I couldn’t find it), the runtime doesn’t appear to support multiple listeners for the queue—or at least it doesn’t call all of them. This means it’s not safe to call listenQueue more than once, because you don’t know which listener will be used.
I usually have ~25 notification events enqueued at the same time, but not all of them were actually run—there were no error logs, and no undelivered messages. I then realized I was probably only supposed to call listenQueue once. So I moved the handlers to functions and called them inside a single listener:
Although the docs don’t clearly state it (at least I couldn’t find it), the runtime doesn’t appear to support multiple listeners for the queue—or at least it doesn’t call all of them. This means it’s not safe to call listenQueue more than once, because you don’t know which listener will be used.
This observation came from the following code:
I usually have ~25 notification events enqueued at the same time, but not all of them were actually run—there were no error logs, and no undelivered messages. I then realized I was probably only supposed to call listenQueue once. So I moved the handlers to functions and called them inside a single listener:
After that, all notifications were correctly delivered.
I don’t know if adding a warning or even throwing an error is feasible, but I believe this behavior could at least be documented more clearly.
The text was updated successfully, but these errors were encountered: