Notifying other threads

can you tell me how to do such a task, I have a specific task (it runs in another thread and does not have any access to user sessions) which should send a Notification for a specified specific page for example /user/123 (all users have access to this page ) and all users on this page should receive a notification“test”);

Sounds like you would need something similar to the broadcaster example from Server Push | Advanced Topics | Vaadin Docs but slightly refactored so that instead of only a single broadcaster, there’s instead one broadcaster for every (actively used) page.


thanks, I’ll try it now

I tried to use the standard code from Collaborative Views, (it does not suit me) since messages only come if sent from a Vaadin flow from some user, if I send a message simply from a Spring Boot flow, then I do not receive any messages, can you show how this can be done make it from another thread please?

if let’s say I called broadcast 10 times (not from the Vaadin thread), then I call broadcast 1 time from the Vaadin thread, and I receive 11 messages in Notification, messages from another thread are simply added to the queue and not executed, they will only be executed when I call 1 time broadcast from Vaadin thread, (I’m not a Vaadin developer who knows how the framework works inside)


It looks like you are missing the @Push annotation on your AppShellConfigurator class

1 Like

Thank you very much!!!, I am very grateful, I don’t even know what I can offer you in return, ask