This content has been marked as final.
Show 1 reply
-
1. Re: Need Help with Broadcast messages
mbarkley Feb 4, 2014 10:37 AM (in response to rathiandi)Hi Amit,
If you want to avoid sending extraneous updates over the wire then you should only be using Errai CDI if the images your users can view is known at compile time. In such a case, you could make Errai CDI work by having different event types for each picture, or one event type with difference qualifiers.
More likely, you'll be having a dynamic number of images, which means the Message Bus will be better suited for your needs. The simplest approach I can think of would be to have a broadcast comments on a channel based on an images name. Then a client can subscribe to that channel when they're viewing an image, and unsubscribe when they stop viewing it.
Cheers.